1. 26 4月, 2016 2 次提交
  2. 24 4月, 2016 2 次提交
    • C
      tests: consistently source test-lib.sh in scripts · 856e84a5
      Cole Robinson 提交于
      This unifies the test scripts to all use the similar pattern added for
      schematests in ace4aecd. This gives the following
      
      - Enables running all tests from outside of tests/ dir
      - Drops redundant abs_* definitions, which are set by test-lib.sh
      - Drops unnecessary srcdir variable which was only used for sourcing
          test-lib.sh
      
      Behavior changes:
      
      - srcdir can no longer be overwritten, but I don't know why anyone would
          really need to...
      - Script VERBOSE setting no longer prints commands executed by test-lib.sh.
          if anyone cares I suggest handling this in test-lib.sh which already
          has other verbose style handling
      856e84a5
    • C
      tests: remove 'reconnect' and 'statstest' · fa90464f
      Cole Robinson 提交于
      These old tests expect to run against a real xen connection via
      xend running on the host. Our intentions for the test suite are
      that it doesn't require interacting with any specific host resources,
      so these don't really belong here.
      fa90464f
  3. 22 4月, 2016 5 次提交
    • C
      tests: rename test_conf -> virconftest · 4839822f
      Cole Robinson 提交于
      And confdata to virconfdata, since 'conf' can mean a few different
      things in libvirt
      4839822f
    • C
      6cf52a2f
    • C
      tests: build: Remove duplicate libvirtd test list · af9d6b1c
      Cole Robinson 提交于
      Store the test list in libvirtd_test_scripts, and use it where
      appropriate. This also fixes the fact that we didn't ship
      virsh-uriprecedence when libvirtd build is disabled.
      af9d6b1c
    • C
      virconf: Handle conf file without ending newline · 3cc2a9e0
      Cole Robinson 提交于
      $ echo -n 'log_level=1' > ~/.config/libvirt/libvirtd.conf
      $ libvirtd --timeout=10
      2014-10-10 10:30:56.394+0000: 6626: info : libvirt version: 1.1.3.6, package: 1.fc20 (Fedora Project, 2014-09-08-17:50:42, buildvm-05.phx2.fedoraproject.org)
      2014-10-10 10:30:56.394+0000: 6626: error : main:1261 : Can't load config file: configuration file syntax error: /home/rjones/.config/libvirt/libvirtd.conf:1: expecting a value: /home/rjones/.config/libvirt/libvirtd.conf
      
      Rather than try to fix this in the depths of the parser, just catch
      the case when a config file doesn't end in a newline, and manually
      append a newline to the content before parsing
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1151409
      3cc2a9e0
    • L
      network: fix DHCPv6 on networks with prefix != 64 · bf3d9f30
      Laine Stump 提交于
      According to the dnsmasq manpage, the netmask for IPv4 address ranges
      will be auto-deteremined from the interface dnsmasq is listening on,
      but it can't do this for IPv6 for some reason - it instead assumes a
      network prefix of 64 for all IPv6 address ranges. If this is
      incorrect, dnsmasq will refuse to give out an address to clients,
      instead logging this message:
      
       dnsmasq-dhcp[2380]: no address range available for DHCPv6 request via virbr0
      
      The solution is for libvirt to add ",$prefix" to all IPv6 dhcp-range
      arguments when building the dnsmasq.conf file.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1033739
      bf3d9f30
  4. 21 4月, 2016 3 次提交
  5. 20 4月, 2016 6 次提交
    • C
      storage: remove support for /usr/bin/kvm-img · 487d211d
      Cole Robinson 提交于
      This an ubuntu/debian packaging convention. At one point it may have
      been an actually different binary, but at least as of ubuntu precise
      (the oldest supported ubuntu distro, released april 2012) kvm-img is
      just a symlink to qemu-img for back compat.
      
      I think it's safe to drop support for it
      487d211d
    • A
      tests: Fix enumeration value · bf01999e
      Andrea Bolognani 提交于
      Commit 3a773c43 introduced the testCompareNetXML2XMLResult
      enumeration; however, in one instance the result variable was
      assigned a value from the very similar testCompareDocXML2XMLResult
      enumeration, leading to a build error.
      
        networkxml2xmltest.c:33:42: error:
          implicit conversion from enumeration type 'testCompareDomXML2XMLResult'
          to different enumeration type 'testCompareNetXML2XMLResult'
          [-Werror,-Wenum-conversion]
      
        testCompareNetXML2XMLResult result = TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS;
                                    ~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Use the proper value (TEST_COMPARE_NET_XML2XML_RESULT_SUCCESS) instead.
      bf01999e
    • A
      conf: Expose GIC capabilities · 4e2d82f7
      Andrea Bolognani 提交于
      Add information about GIC capabilities to virDomainCaps and update
      the formatter to include them in the XML output.
      4e2d82f7
    • A
      conf: Get rid of virDomainCapsDevice · 29980231
      Andrea Bolognani 提交于
      The struct contains a single boolean field, 'supported':
      the meaning of this field is too generic to be limited to
      devices only, and in fact it's already being used for
      other things like loaders and OSs.
      
      Instead of trying to come up with a more generic name just
      get rid of the struct altogether.
      29980231
    • L
      network: prevent duplicate entries in network device pools · 3583e75d
      Laine Stump 提交于
      Prior to this patch we didn't make any attempt to prevent two entries
      in the array of interfaces/PCI devices from pointing to the same
      device.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1002423
      3583e75d
    • L
      test: enable testing for expected parse errors in network XML · 3a773c43
      Laine Stump 提交于
      This is patterned after similar functionality for domain XML tests,
      but tries harder to avoid reading non-existent networkxml2xmlout data
      file when parse fails.
      3a773c43
  6. 19 4月, 2016 2 次提交
    • M
      Include sysmacros.h where needed · aca4d72b
      Martin Kletzander 提交于
      So in glibc-2.23 sys/sysmacros.h is no longer included from sys/types.h
      and we don't build because of the usage of major/minor/makedev macros.
      Autoconf already has AC_HEADER_MAJOR macro that check where exactly
      these functions/macros are defined, so let's use that.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      aca4d72b
    • J
      tests: Fix syntax in iSCSI auth/secret tests · dd140028
      John Ferlan 提交于
      While working on the tests for the secret initialization vector, I found
      that the existing iSCSI tests were lacking in how they defined the IQN.
      Many had IQN's of just 'iqn.1992-01.com.example' for one disk while using
      'iqn.1992-01.com.example/1' for the second disk (same for hostdevs - guess
      how they were copied/generated).
      
      Typically (and documented this way), IQN's would include be of the form
      'iqn.1992-01.com.example:storage/1' indicating an IQN using "storage" for
      naming authority specific string and "/1" for the iSCSI LUN.
      
      So modify the input XML's to use the more proper format - this of course
      has a ripple effect on the output XML and the args.
      
      Also note that the "%3A" is generated by the virURIFormat/xmlSaveUri
      to represent the colon.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      dd140028
  7. 18 4月, 2016 1 次提交
    • J
      Libvirt: virTypedParamsValidate: Fix detection of multiple parameters · 0e570a6a
      Jason J. Herne 提交于
      virTypedParamsValidate currently uses an index based check to find
      duplicate parameters. This check does not work. Consider the following
      simple example:
      
      We have only 2 keys
      A  (multiples allowed)
      B  (multiples NOT allowed)
      
      We are given the following list of parameters to check:
      A
      A
      B
      
      If you work through the validation loop you will see that our last iteration
      through the loop has i=2 and j=1. In this case, i > j and keys[j].value.i will
      indicate that multiples are not allowed. Both conditionals are satisfied so
      an incorrect error will be given: "parameter '%s' occurs multiple times"
      
      This patch replaces the index based check with code that remembers
      the name of the last parameter seen and only triggers the error case if
      the current parameter name equals the last one. This works because the
      list is sorted and duplicate parameters will be grouped together.
      
      In reality, we hit this bug while using selective block migration to migrate
      a guest with 5 disks. 5 was apparently just the right number to push i > j
      and hit this bug.
      
      virsh migrate --live guestname --copy-storage-all
                    --migrate-disks vdb,vdc,vdd,vde,vdf
                    qemu+ssh://dsthost/systemSigned-off-by: NJason J. Herne <jjherne@linux.vnet.ibm.com>
      Reviewed-by: NEric Farman <farman@linux.vnet.ibm.com>
      0e570a6a
  8. 15 4月, 2016 10 次提交
    • P
      qemu: caps: Deprecate QEMU_CAPS_BALLOON · 2242a008
      Peter Krempa 提交于
      The flag is now unused and all qemus supported by libvirt already
      support it.
      2242a008
    • L
      qemu: support new pci controller model "pcie-expander-bus" · 8b62c65d
      Laine Stump 提交于
      This is backed by the qemu device pxb-pcie, which will be available in
      qemu 2.6.0.
      
      As with pci-expander-bus (which uses qemu's pxb device), the busNr
      attribute and <node> subelement of <target> are used to set the bus_nr
      and numa_node options.
      
      During post-parse we validate that the domain's machinetype is
      q35-based (since the device shows up for 440fx-based machinetypes, but
      is unusable), as well as checking that <node> specifies a node that is
      actually configured on the guest.
      8b62c65d
    • L
      conf: new pci controller model pcie-expander-bus · bc07251f
      Laine Stump 提交于
      This controller provides a single PCIe port on a new root. It is
      similar to pci-expander-bus, intended to provide a bus that can be
      associated with a guest-identifiable NUMA node, but is for
      machinetypes with PCIe rather than PCI (e.g. q35-based machinetypes).
      
      Aside from PCIe vs. PCI, the other main difference is that a
      pci-expander-bus has a companion pci-bridge that is automatically
      attached along with it, but pcie-expander-bus has only a single port,
      and that port will only connect to a pcie-root-port, or to a
      pcie-switch-upstream-port. In order for the bus to be of any use in
      the guest, it must have either a pcie-root-port or a
      pcie-switch-upstream-port attached (and one or more
      pcie-switch-downstream-ports attached to the
      pcie-switch-upstream-port).
      bc07251f
    • L
      qemu: add capabilities bit for device "pxb-pcie" · 0ec0bc85
      Laine Stump 提交于
          The pxb device is a PCIe expander bus that can be added to any
          Q35-based machinetype. A single PCIe port (*not* hotpluggable) is
          provided; if more than one device is desired, or if hotplug
          support is needed, either a pcie-root-port, or some combination of
          pcie-switch-upstream-port and pcie-swith-downstream-ports must be
          added to it. It can have a NUMA node number associated with it, as
          well as a bus number.
      0ec0bc85
    • L
      qemu: support new pci controller model "pci-expander-bus" · 400b2976
      Laine Stump 提交于
      This is backed by the qemu device "pxb".
      
      The pxb device always includes a pci-bridge that is at the bus number
      of the pxb + 1.
      
      busNr and <node> from the <target> subelement are used to set the
      bus_nr and numa_node options for pxb.
      
      During post-parse we validate that the domain's machinetype is
      440fx-based (since the pxb device only works on 440fx-based machines),
      and <node> also gets a sanity check to assure that the NUMA node
      specified for the pxb (if any - it's optional) actually exists on the
      guest.
      400b2976
    • L
      conf: new pci controller model pci-expander-bus · 52f3d0a4
      Laine Stump 提交于
      This is a standard PCI root bus (not a bridge) that can be added to a
      440fx-based domain. Although it uses a PCI slot, this is *not* how it
      is connected into the PCI bus hierarchy, but is only used for
      control. Each pci-expander-bus provides 32 slots (0-31) that can
      accept hotplug of standard PCI devices.
      
      The usefulness of pci-expander-bus relative to a pci-bridge is that
      the NUMA node of the bus can be specified with the <node> subelement
      of <target>. This gives guest-side visibility to the NUMA node of
      attached devices (presuming that management apps only assign a device
      to a bus that has a NUMA node number matching the node number of the
      device on the host).
      
      Each pci-expander-bus also has a "busNr" attribute. The expander-bus
      itself will take the busNr specified, and all buses that are connected
      to this bus (including the pci-bridge that is automatically added to
      any expander bus of model "pxb" (see the next commit)) will use
      busNr+1, busNr+2, etc, and the pci-root (or the expander-bus with next
      lower busNr) will use bus numbers lower than busNr.
      52f3d0a4
    • L
      qemu: add capabilities bit for device "pxb" · 5d4e2b17
      Laine Stump 提交于
      The pxb device is a PCI expander bus that can be added to any
      440fx-based machinetype. The PCI bus that is created has 32 standard
      PCI slots (hotpluggable). It can have a NUMA node number associated
      with it, as well as a bus number.
      5d4e2b17
    • L
      conf: allow use of slot 0 in a dmi-to-pci-bridge · 0d668434
      Laine Stump 提交于
      When support for dmi-to-pci-bridge was added, it was assumed that,
      just as with the pci-root bus, slot 0 was reserved. This is not the
      case - it can be used to connect a device just like any other slot, so
      remove the restriction and update the test cases that auto-assign an
      address on a dmi-to-pci-bridge.
      0d668434
    • C
      test: genericxml2xml: test graphics listen= compat · 313272e0
      Cole Robinson 提交于
      * Add a test for listen=XXX and <listen address=YYY/> collision error
      * Add an explicit test for listen=XXX duplicated to <listen address=XXX/>
        We implicitly test it elsewhere but I figure it's better to be explicit,
        and this test case can be extended in the future for additional listen
        back compat if/when we support <listen type='socket'/> syntax
      313272e0
    • C
      tests: Enable failure testing with CompareDomXML2XML · c493d216
      Cole Robinson 提交于
      This allows tests to check for specific failure scenarios
      c493d216
  9. 14 4月, 2016 3 次提交
  10. 13 4月, 2016 5 次提交
    • J
      qemuxml2argvtest: do not mock virCommand · cbbd74aa
      Ján Tomko 提交于
      Mock virNetDevRunEthernetScript instead.
      
      This restores the VIR_TEST_REGENERATE_OUTPUT functionality.
      cbbd74aa
    • J
      qemu: assign addresses before aliases · 786bc251
      Ján Tomko 提交于
      The address assigning code might add new pci bridges.
      We need them to have an alias when building the command line.
      
      In real word usage, this is not a problem because all the code
      paths already call qemuDomainAssignAddresses. However moving
      this call lets us remove one extra call from qemuxml2argvtest.
      786bc251
    • J
      qemuxml2argvtest: drop FLAG_EXPECT_ERROR · 1922d2f1
      Ján Tomko 提交于
      It is only used for failed address allocation
      Since we already have FLAG_EXPECT_FAILURE, use that instead.
      
      Also unify the output to print the whole log buffer instead
      of just the last error message.
      1922d2f1
    • J
      tests: clean up includes · f36c9f7b
      Ján Tomko 提交于
      After removing qemuBuildCommandLineCallbacks, testutilsqemu.h does not
      need to include qemu_command.h.
      
      Include just qemu_conf.h here and qemu_domain_address.h in files that
      need it.
      f36c9f7b
    • J
      drop qemuBuildCommandLineCallbacks · 0da965c5
      Ján Tomko 提交于
      Essentially revert commit 3a6204cb which added these to allow the test
      suite to pass without depending on the host system state.
      
      Since commit 4b527c1a we already mock virSCSIDeviceGetSgName, so these
      callbacks are useless.
      0da965c5
  11. 12 4月, 2016 1 次提交
    • J
      tests: fix xen-related tests · 4b35a715
      Ján Tomko 提交于
      My commit 6879be48 moved the addition of the implicit video device
      from the XML parser to the PostParse function, but did not regenerate
      all the tests.
      4b35a715