1. 11 7月, 2013 1 次提交
  2. 10 7月, 2013 3 次提交
  3. 08 7月, 2013 1 次提交
    • J
      Resolve Coverity complaints in tests/securityselinuxlabeltest.c · a443c3a7
      John Ferlan 提交于
      Two complaints of RESOURCE_FREE due to going to cleanup prior to a
      VIR_FREE(line).  Two complaints of FORWARD_NULL due to 'tmp' being
      accessed after a strchr() without first checking if the return was NULL.
      
      While looking at the code it seems that 'line' need only be allocated
      once as the while loop will keep reading into line until eof causing
      an unreported leak since line was never VIR_FREE()'d at the bottom of
      the loop.
      a443c3a7
  4. 05 7月, 2013 1 次提交
  5. 01 7月, 2013 1 次提交
  6. 28 6月, 2013 2 次提交
  7. 27 6月, 2013 1 次提交
    • L
      nodedev: add iommuGroup to node device object · 8807b285
      Laine Stump 提交于
      This includes adding it to the nodedev parser and formatter, docs, and
      test.
      
      An example of the new iommuGroup element that is a part of the output
      from "virsh nodedev-dumpxml" (virNodeDeviceGetXMLDesc()):
      
        <device>
          <name>pci_0000_02_00_1</name>
          <capability type='pci'>
          ...
            <iommuGroup number='12'>
              <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
              <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
            </iommuGroup>
          </capability>
        </device>
      8807b285
  8. 26 6月, 2013 1 次提交
    • L
      test: include qemuhotplugtest data files in source rpm · ec30f0f7
      Laine Stump 提交于
      commit 0fc12bca added a new test called qemuhotplugtest which has
      several data files in tests/qemuhotplugtestdata, but didn't add that
      directory to EXTRA_DIST in the tests Makefile.am, so the make check
      done during a make rpm was failing due to missing data files.
      ec30f0f7
  9. 25 6月, 2013 2 次提交
  10. 21 6月, 2013 3 次提交
    • J
      storage: add support for creating qcow2 images with extensions · 6298f74d
      Ján Tomko 提交于
      Add -o compat= and -o lazy_refcounts options for qemu-img.
      6298f74d
    • J
      conf: add features to volume target XML · 31d42506
      Ján Tomko 提交于
      Add <features> and <compat> elements to volume target XML.
      
      <compat> is a string which for qcow2 represents the QEMU version
      it should be compatible with. Valid values are 0.10 and 1.1.
      1.1 is implicit if the <features> element is present, otherwise
      qemu-img default is used. 0.10 can be specified to explicitly
      create older images after the qemu-img default changes.
      
      <features> contains optional features, so far
      <lazy_refcounts/> is available, which enables caching of reference
      counters, improving performance for snapshots.
      31d42506
    • J
      qemu: add hv_vapic and hv_spinlocks support · 19f75d5e
      Ján Tomko 提交于
      XML:
      <features>
        <hyperv>
          <vapic state='on'/>
          <spinlocks state='on' retries='4096'/>
        </hyperv>
      </features>
      
      results in the following QEMU command line:
      qemu -cpu <cpu_model>,hv_vapic,hv_spinlocks=0x1000
      
      https://bugzilla.redhat.com/show_bug.cgi?id=784836
      19f75d5e
  11. 19 6月, 2013 1 次提交
    • J
      util: switch virBufferTrim to void · d0d0413e
      Ján Tomko 提交于
      We don't care whether the trim was succesful or not anywhere
      except the tests.
      
      Switch it to void and set the buffer error on wrong usage.
      d0d0413e
  12. 11 6月, 2013 1 次提交
  13. 07 6月, 2013 1 次提交
  14. 06 6月, 2013 3 次提交
    • J
      qemu: change two-state int parameters to bool · 5debc722
      Ján Tomko 提交于
      5debc722
    • J
      Replace two-state local integers with bool · e557766c
      Ján Tomko 提交于
      Found with 'git grep "= 1"'.
      e557766c
    • M
      qemu: Reformat listen address prior to checking · e5fa9db1
      Michal Privoznik 提交于
      Currently, a listen address for a SPICE server can be specified. Later,
      when the domain is migrated, we need to relocate the graphics which
      involves telling new destination to the SPICE server. However, we can't
      just assume the listen address is the new location, because the listen
      address can be ANYCAST (0.0.0.0 for IPv4, :: for IPv6). In which case,
      we want to pass the remote hostname. But there are some troubles with
      ANYCAST. In both IPv4 and IPv6 it has many ways for specifying such
      address. For instance, in IPv4: 0, 0.0, 0.0.0, 0.0.0.0.  The number of
      variations gets bigger in IPv6 world. Hence, in order to check for
      ANYCAST address sanely, we should take the provided listen address,
      parse it and format back in it's full form. Which is exactly what this
      patch does.
      e5fa9db1
  15. 05 6月, 2013 1 次提交
  16. 04 6月, 2013 1 次提交
  17. 03 6月, 2013 1 次提交
  18. 01 6月, 2013 3 次提交
    • O
      conf: Generate address for scsi host device automatically · cdb97895
      Osier Yang 提交于
      With unknown good reasons, the attribute "bus" of scsi device
      address is always set to 0, same for attribute "target". (See
      virDomainDiskDefAssignAddress).
      
      Though we might need to change the algorithm to honor "bus"
      and "target" too, that's a different issue. The address generator
      for scsi host device in this patch just follows the unknown
      good reasons, only considering the "controller" and "unit".
      It walks through all scsi controllers and their units, to see
      if the address $controller:0:0:$unit can be used (if not used
      by any disk or scsi host device yet), if found one, it sits on
      it, otherwise, it creates a new controller (actually the controller
      is implicitly created by someone else), and sits on
      $new_controller:0:0:0 instead.
      cdb97895
    • E
      build: skip qemu in tests when !WITH_QEMU · 3d2b9715
      Eric Blake 提交于
      A mingw build (where the qemu driver is not built, so WITH_QEMU
      is undefined) failed with:
      
      In file included from ../../src/qemu/qemu_command.h:30:0,
                       from ../../tests/testutilsqemu.h:4,
                       from ../../tests/networkxml2xmltest.c:14:
      ../../src/qemu/qemu_conf.h:53:4: error: #error "Port me"
      
      But since testutilsqemu.c is already conditional, the header
      should be likewise.
      
      * tests/testutilsqemu.h: Make content conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      3d2b9715
    • D
      Introduce virFilePrintf() as a portable fprintf() · a2619962
      Daniel P. Berrange 提交于
      We can't use GNULIB's fprintf-posix due to licensing
      incompatibilities. We do already have a portable
      formatting via virAsprintf() which we got from GNULIB
      though. We can use to create a virFilePrintf() function.
      
      But really gnulib could just provide a 'fprintf'
      module, that depended on just its 'asprintf' module.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a2619962
  19. 24 5月, 2013 2 次提交
    • M
      virStrndup: Accept negative values as string length · c9357196
      Michal Privoznik 提交于
      It may shorten the code a bit as the following pattern:
      
        VIR_STRNDUP(dst, src, cond ? n : strlen(src))
      
      is used on several places among our code. However, we can
      move the strlen into virStrndup and thus write just:
      
        VIR_STRNDUP(dst, src, cond ? n : -1)
      c9357196
    • V
      cgroups: Do not enforce nonexistent controllers · eb21408f
      Viktor Mihajlovski 提交于
      Currently, the controllers argument to virCgroupDetect acts both as
      a result filter and a required controller specification, which is
      a bit overloaded. If both functionalities are needed, it would be
      better to have them seperated into a filter and a requirement mask.
      The only situation where it is used today is to ensure that only
      CPU related controllers are used for the VCPU directories. But here
      we clearly do not want to enforce the existence of cpu, cpuacct and
      specifically not cpuset at the same time.
      This commit changes the semantics of controllers to "filter only".
      Should a required mask ever be needed, more work will have to be done.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      eb21408f
  20. 22 5月, 2013 3 次提交
  21. 21 5月, 2013 4 次提交
    • O
      tests/: Remove the whitespace before ";" · bb3ea841
      Osier Yang 提交于
      bb3ea841
    • J
      shunloadtest: Resolve Coverity CHECKED_RETURN error · 995bf76d
      John Ferlan 提交于
      The shunloadStart function didn't check the status of virInitialize which
      was flagged by Coverity.  Adjust the function and shunloadtest in order
      to handle the situation.
      995bf76d
    • J
      xencapstest: Resolve Coverity CHECKED_RETURN error · 01757a46
      John Ferlan 提交于
      The return from virInitialize() needs to be checked.
      01757a46
    • E
      maint: use LGPL correctly · d7f53c7b
      Eric Blake 提交于
      Several files called out COPYING or COPYING.LIB instead of using
      the normal boilerplate.  It's especially important that we don't
      call out COPYING from an LGPL file, since COPYING is traditionally
      used for the GPL.  A few files were lacking copyright altogether.
      
      * src/rpc/gendispatch.pl: Add missing copyright.
      * Makefile.nonreentrant: Likewise.
      * src/check-symfile.pl: Likewise.
      * src/check-symsorting.pl: Likewise.
      * src/driver.h: Likewise.
      * src/internal.h: Likewise.
      * tools/libvirt-guests.sh.in: Likewise.
      * tools/virt-pki-validate.in: Mention copyright in comment, not just code.
      * tools/virt-sanlock-cleanup.in: Likewise.
      * src/rpc/genprotocol.pl: Spell out license terms.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * Makefile.am: Likewise.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * docs/schemas/Makefile.am: Likewise.
      * examples/apparmor/Makefile.am: Likewise.
      * examples/domain-events/events-c/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * examples/hellolibvirt/Makefile.am: Likewise.
      * examples/openauth/Makefile.am: Likewise.
      * examples/python/Makefile.am: Likewise.
      * examples/systemtap/Makefile.am: Likewise.
      * examples/xml/nwfilter/Makefile.am: Likewise.
      * gnulib/lib/Makefile.am: Likewise.
      * gnulib/tests/Makefile.am: Likewise.
      * include/Makefile.am: Likewise.
      * include/libvirt/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * python/tests/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * configure.ac: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d7f53c7b
  22. 20 5月, 2013 1 次提交
    • O
      qemu: Add callback struct for qemuBuildCommandLine · 3a6204cb
      Osier Yang 提交于
      Since 0d70656a, it starts to access the sysfs files to build
      the qemu command line (by virSCSIDeviceGetSgName, which is to find
      out the scsi generic device name by adpater:bus:target:unit), there
      is no way to work around, qemu wants to see the scsi generic device
      like "/dev/sg6" anyway.
      
      And there might be other places which need to access sysfs files
      when building qemu command line in future.
      
      Instead of increasing the arguments of qemuBuildCommandLine, this
      introduces a new callback for qemuBuildCommandLine, and thus tests
      can register their own callbacks for sysfs test input files accessing.
      
      * src/qemu/qemu_command.h: (New callback struct
                                  qemuBuildCommandLineCallbacks;
                                  extern buildCommandLineCallbacks)
      * src/qemu/qemu_command.c: (wire up the callback struct)
      * src/qemu/qemu_driver.c: (Use the new syntax of qemuBuildCommandLine)
      * src/qemu/qemu_hotplug.c: Likewise
      * src/qemu/qemu_process.c: Likewise
      * tests/testutilsqemu.[ch]: (Helper testSCSIDeviceGetSgName;
                                   callback struct testCallbacks;)
      * tests/qemuxml2argvtest.c: (Use testCallbacks)
      * src/tests/qemuxmlnstest.c: (Like above)
      3a6204cb
  23. 17 5月, 2013 2 次提交