1. 10 9月, 2009 9 次提交
    • D
      Fix more OOM handling bugs · cbe63e52
      Daniel P. Berrange 提交于
      * src/qemu_conf.c: Fix leak of values upon OOM
      * src/xend_internal.c: Fix missing check for OOM failure
      * tests/qemuargv2xmltest.c, tests/qemuxml2argvtest.c: Free
        stateDir upon exit to avoid leak
      cbe63e52
    • D
      Fix misc thread locking bugs / bogus warnings · 5c8d3d3b
      Daniel P. Berrange 提交于
      Fix all thread locking bugs reported by object-locking test
      case.
      
      NB, some of the driver locking is getting too coarse. Driver
      mutexes really need to be turned into RW locks instead to
      significantly increase concurrency.
      
      * src/lxc_driver.c: Fix useof driver when unlocked in the methods
        lxcDomainGetInfo, lxcSetSchedulerParameters, and
        lxcGetSchedulerParameters
      * src/opennebula/one_driver.c: Fix missing unlock in oneDomainUndefine.
        Fix use of driver when unlocked in oneDomainGetInfo,
        oneGetOSType, oneDomainShutdown
      * src/qemu_driver.c: Fix use of driver when unlocked in
        qemudDomainSavem, qemuGetSchedulerType, qemuSetSchedulerParameters
        and qemuGetSchedulerParameters
      * src/storage_driver.c: Re-work storagePoolCreate to avoid bogus
        lock checking warning. Re-work storageVolumeCreateXMLFrom to
        remove a potential NULL de-reference & avoid bogus lock check
        warnings
      * src/test.c: Remove testDomainAssignDef since it break lock chekc
        warnings.
      * tests/object-locking.ml: Add oneDriverLock, oneDriverUnlock
        and one_driver_t methods/types to allow lock checking on the
         OpenNebula drivers
      5c8d3d3b
    • M
      Test that domain-specific qemu machine types are used correctly · e52d608d
      Mark McLoughlin 提交于
      * tests/testutilsqemu.c: add a machine types list for /usr/bin/kvm
        which doesn't have any aliases, while the guest has aliases
      
      * tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.*,
        tests/qemuxml2argvtest.c: add a test using /usr/bin/kvm and make
        sure that 'pc' machine type doesn't get canonicalized using the
        aliases in the guest machine type list
      e52d608d
    • M
      Test qemu machine aliases · aa67241b
      Mark McLoughlin 提交于
      * tests/testutilsqemu.c: make 'pc' an alias for qemu-system-x86_64
      
      * tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.*,
        tests/qemuxml2argvtest.c: add a test which uses qemu-system-x86_64
        and make sure the machine type is canonicalized.
      aa67241b
    • M
      Re-factor qemu test machine allocation code · d4c032d0
      Mark McLoughlin 提交于
      * test/testutilsqemu.c: split out code to testQemuAllocMachines()
        and make use of the ARRAY_CARDINALITY macro
      d4c032d0
    • M
      Canonicalize the qemu machine type in qemuxml2argvtest · 6e7ab461
      Mark McLoughlin 提交于
      This doesn't have any affect on the current tests because we don't have
      any machine aliases in the current test data.
      
      * src/qemu_conf.h, src/qemu_driver.c: expose qemudCanonicalizeMachine()
        for the tests
      
      * tests/qemuxml2argvtest.c: canonicalize the machine type
      6e7ab461
    • M
      Dump qemu driver capabilities if test debugging enabled · d7ed2c18
      Mark McLoughlin 提交于
      * src/testutils.[ch]: make testDebug externally available
      
      * src/testutilsqemu.c: if VIR_TEST_DEBUG is set, dump the qemu
        driver capabilities to stderr
      d7ed2c18
    • M
      Add qemu -help test data for qemu-kvm-0.11.0-rc2 · 110abb03
      Mark McLoughlin 提交于
      * tests/qemuhelpdata/qemu-kvm-0.11.0-rc2: add data
      
      * tests/qemuhelptest.c: add expected output
      110abb03
    • M
      Add a more featureful qemu capabilities test data · cebd575c
      Mark McLoughlin 提交于
      Things added include
      
        - x86_64 host
        - Migration features
        - NUMA topology
        - Security model
        - Canonical machine types
        - Domain machine types
        - An arm guest
        - More machine types for mips, mipsel, sparc and ppc
        - An x86_64 xenner guest
      
      This file was generated on a Fedora 12 machine using latest libvirt
      and qemu-kvm-0.11.0-rc2
      
      * tests/capabilityschemadata/caps-qemu-kvm.xml: add more features
        to test
      cebd575c
  2. 05 9月, 2009 1 次提交
  3. 04 9月, 2009 1 次提交
    • D
      Avoid polling on FDs with no events enabled · 34d22c1e
      Daniel P. Berrange 提交于
      If a file descriptor with events=0 was added to the libvirtd
      event loop, it would still be added to the poll() fds' array.
      While it wouldn't see any POLLIN/OUT events, it'd still get
      triggered for HANGUP/ERROR events which was not in compliance
      with the libvirt events API contract.
      
      * qemud/event.c: Don't poll on FDs with events=0
      * tests/eventtest.c: Add test case to validate fix to event.c
      34d22c1e
  4. 03 9月, 2009 3 次提交
    • D
      Add support for setting disk drive serial numbers · 85d15b51
      Daniel P. Berrange 提交于
      * docs/schemas/domain.rng: Add <serial> element to disks
      * src/domain_conf.h, src/domain_conf.c: XML parsing and
        formatting for disk serial numbers
      * src/qemu_conf.c: Set serial number when launching guests
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.args,
        tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml: Add
        serial number to XML test
      85d15b51
    • D
      Support configuration of huge pages in guests · d823a05a
      Daniel P. Berrange 提交于
      Add option to domain XML for
      
           <memoryBacking>
              <hugepages/>
           </memoryBacking>
      
      * configure.in: Add check for mntent.h
      * qemud/libvirtd_qemu.aug, qemud/test_libvirtd_qemu.aug, src/qemu.conf
        Add 'hugetlbfs_mount' config parameter
      * src/qemu_conf.c, src/qemu_conf.h: Check for -mem-path flag in QEMU,
        and pass it when hugepages are requested.
        Load hugetlbfs_mount config parameter, search for mount if not given.
      * src/qemu_driver.c: Free hugetlbfs_mount/path parameter in driver shutdown.
        Create directory for QEMU hugepage usage, chowning if required.
      * docs/formatdomain.html.in: Document memoryBacking/hugepages elements
      * docs/schemas/domain.rng: Add memoryBacking/hugepages elements to schema
      * src/util.c, src/util.h, src/libvirt_private.syms: Add virFileFindMountPoint
        helper API
      * tests/qemuhelptest.c: Add -mem-path constants
      * tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: Add tests for hugepage
        handling
      * tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml,
        tests/qemuxml2argvdata/qemuxml2argv-hugepages.args: Data files for
        hugepage tests
      d823a05a
    • D
      Fix misc OOM bugs · 8eacfd4c
      Daniel P. Berrange 提交于
      * tests/testutils.c: Run test function twice, once to prime it for
        static allocations, once to count the non-static allocations.
      * tests/testutilsqemu.c: Initialize variable correctl
      * src/capabilities.c: Don't free machines variable upon failure
        since caller must do that
      * src/xm_internal.c: Add missing check for OOM in building VIF
        config param
      8eacfd4c
  5. 02 9月, 2009 2 次提交
    • D
      Don't blindly reorder disk drives · 2d6adabd
      Daniel P. Berrange 提交于
      Calling qsort() on the disks array causes disk to be
      unneccessarily re-ordered, potentially breaking the
      ability to boot if the boot disk gets moved later in
      the list. The new algorithm will insert a new disk as
      far to the end of the list as possible, while being
      ordered correctly wrt other disks on the same bus.
      
      * src/domain_conf.c, src/domain_conf.h: Remove disk sorting
        routines. Add API to insert a disk into existing list at
        the optimal position, without resorting disks
      * src/libvirt_private.syms: Export virDomainDiskInsert
      * src/xend_internal.c, src/xm_internal.c: Remove calls to
        qsort, use virDomainDiskInsert instead.
      * src/qemu_driver.c: Remove calls to qsort, use virDoaminDiskInsert
        instead. Fix reordering bugs when hotunplugging disks and
        networks. Fix memory leak in disk/net unplug
      2d6adabd
    • M
      Attach encryption information to virStorageVolDef. · eda3af24
      Miloslav Trmač 提交于
      The XML allows <encryption format='unencrypted'/>, this implementation
      canonicalizes the internal representation so that "vol->encryption" is
      non-NULL iff the volume is encrypted.
      
      Note that partial encryption information (e.g. specifying an encryption
      format, but not the key/passphrase) is valid, libvirt will automatically
      choose value for the missing information during volume creation.  The
      user can read the volume XML, and use the unmodified <encryption> tag in
      future operations (without having to be able to understand) its contents.
      
      * docs/formatstorage.html, docs/formatstorage.html.in: Document
        storage volume encryption options
      * src/storage_conf.c, src/storage_conf.h: Hook up storage
        encryption XML handling
      * tests/storagevolschemadata/vol-qcow2.xml: Test case for encryption
        schema changes
      eda3af24
  6. 20 8月, 2009 1 次提交
    • D
      Add test for recently fixed crash with latest XenD · da8b7c9f
      Daniel P. Berrange 提交于
      Test case for the fix applied in
      
        commit 14435163
        Author: Daniel Veillard <veillard@redhat.com>
        Date:   Fri Jun 26 18:14:16 2009 +0000
      
      * tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.sexpr,
        tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml: Data
        files exhibiting the crash
      * tests/sexpr2xmltest.c: Process new data files
      da8b7c9f
  7. 14 8月, 2009 1 次提交
    • M
      Detect KVM's PCI device assignment support · d4528d9a
      Mark McLoughlin 提交于
      PCI device assignment is only supported in KVM's fork of qemu, so we
      should really detect its availability and give a nice error if its
      not supported.
      
      * src/qemu_conf.[ch]: introduce QEMUD_CMD_FLAG_PCIDEVICE indicating
        that the -pcidevice command line option is available
      
      * tests/*: update the tests
      d4528d9a
  8. 06 8月, 2009 2 次提交
    • A
      Consolidate code for parsing the logging env · 63fbcc69
      Amy Griffis 提交于
      * src/logging.c src/logging.h src/libvirt_private.syms:
        define new functions virLogSetFromEnv and virLogParseDefaultPriority
      * qemud/qemud.c src/libvirt.c tests/eventtest.c: cleanup to use the
        unified functions
      63fbcc69
    • A
      Cleanup VIR_LOG_DEBUG parsing in eventtest · e542d52a
      Amy Griffis 提交于
      * tests/eventtest.c: don't covert high priority levels to debug level.
        Consider an invalid priority level setting a setup failure.
      e542d52a
  9. 27 7月, 2009 2 次提交
    • D
      Fix crashes in Xen capabilities code · dd6cd7dd
      Daniel P. Berrange 提交于
      * src/xen_internal.c: Don't free memory now owned by the virCapsPtr
         structure
      * tests/testutilsxen.c: Fix up for change in internal API
      dd6cd7dd
    • M
      Add virCapsGuestMachine structure · 38fd207e
      Mark McLoughlin 提交于
      A subsequent commit will add a "canonical" field to this structure,
      this patch basically just prepares the way for that.
      
      The new type is added, along with virCapabilitiesAlloc/FreeMachines()
      helpers and a whole bunch of code to make the transition.
      
      One quirk is that virCapabilitiesAddGuestDomain() and
      virCapabilitiesAddGuest() take ownership of the machine list rather
      than duping it. This makes sense to avoid needless copying.
      
      * src/capabilities.h: add the virCapsGuestMachine struct and use it
        in virCapsGuestDomainInfo, add prototypes for new functions and
        update the AddGuest() prototypes
      
      * src/capabilities.c: add code for allocating and freeing the new
        type, change the machines parameter to AddGuest() etc.
      
      * src/libvirt_private.syms: export the new helpers
      
      * src/qemu_conf.c: update all the machine type code to use the new
        struct
      
      * src/xen_internal.c: ditto
      
      * tests/testutilsqemu.c: ditto
      38fd207e
  10. 22 7月, 2009 3 次提交
    • J
      avoid a make distcheck failure: distribute tests/interfaceschemadata/ · 20448818
      Jim Meyering 提交于
      * tests/Makefile.am (EXTRA_DIST): Add interfaceschemadata.
      20448818
    • M
      Assign names to qemu NICs and network backends · c23dae4e
      Mark McLoughlin 提交于
      We need these so that we can remove the devices via the monitor.
      
      * src/domain_conf.h: add nic_name and hostnet_name to virDomainNetDef
      
      * src/domain_conf.c: free nic_name and hostnet_name
      
      * src/qemu_conf.c: add qemuAssignNetNames(), use it if qemu has
        support for the param and pass the names on the command line
      
      * tests/qemuxml2argv*: add a test for this
      c23dae4e
    • M
      Add checks for some NIC hotplug related features added in qemu-0.10.0 · 94889768
      Mark McLoughlin 提交于
      Add QEMUD_CMD_FLAG_NET_NAME to indicate that '-net ...,name=foo' is
      supported and QEMUD_CMD_FLAG_HOST_NET_ADD to indicate that the
      'host_net_add' monitor command is available.
      
      Set both these flags if the qemu version is greater than 0.10.0.
      Checking via the '-help' output would not work for the monitor command
      and even for the command line arg, it would be quite fragile.
      
      * src/qemu_conf.h: add new flags as aliases of QEMUD_CMD_FLAG_0_10
      
      * src/qemu_conf.c: set QEMUD_CMD_FLAG_0_10 for versions >= 0.10.0
      
      * tests/qemuhelptest.c: set QEMUD_CMD_FLAG_0_10 for the appropriate
        qemu versions
      94889768
  11. 16 7月, 2009 3 次提交
    • J
      remove all trailing blank lines · 07613d20
      Jim Meyering 提交于
      by running this command:
      git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/'
      This is in preparation for a more strict make syntax-check
      rule that will detect trailing blank lines.
      07613d20
    • D
      netcf XML validation and input and output tests · 788c3151
      Daniel Veillard 提交于
      * tests/interfaceschematest: test all XML data against the interface
        schemas
      * tests/interfacexml2xmltest.c: parse and reserialize all XML data
        and check the output is identical
      * tests/Makefile.am: hook up the tests
      * tests/.gitignore: add ignore test
      788c3151
    • D
      Add netcf XML schemas and test data · 19e57fd9
      Daniel Veillard 提交于
      * docs/schemas/interface.rng: schemas for the interface XML files
        directly imported from netcf-0.1.0
      * tests/interfaceschemadata/*.xml: set of test files from netcf-0.1.0
        changed to use single quote instead of double quote
      19e57fd9
  12. 10 7月, 2009 2 次提交
    • M
      Switch to using a unix socket for the qemu monitor · 62455ed8
      Mark McLoughlin 提交于
      We keep support for the pty based monitor so that we can re-connect
      to VMs started by older versions of libvirtd.
      
      * src/domain_conf.c: handle formatting and parsing unix monitors
      
      * src/qemu_driver.c: add qemudOpenMonitorUnix(), remove the monitor
        pty path searching from qemudFindCharDevicePTYs(), switch
        qemudStartVMDaemon() and qemuDomainXMLToNative() to using a unix
        monitor
      
      * tests/qemuxml2argvtest.c: switch to using a unix monitor
      
      * tests/qemuxml2argvdata/qemuxml2argv-*.args: update test data
      62455ed8
    • M
      Add the monitor type to the domain state XML · 05d377bd
      Mark McLoughlin 提交于
      There are no functional changes in this patch apart from adding the
      monitor type to the state XML.
      
      The patch mostly consists of switching to use virDomainChrDef every
      where to describe the monitor.
      
      * src/domain_conf.h: replace monitorpath with monitor_chr
      
      * src/domain_conf.c: handle parsing the monitor type and initializing
        monitor chr
      
      * src/qemu_conf.[ch]: make qemudBuildCommandLine take a
        virDomainChrDefPtr and use that to build the -monitor parameter
      
      * src/qemu_driver.c: split pty specific and common code from
        qemudOpenMonitor, have qemudStartVMDaemon() initialize monitor_chr
      
      * tests/qemuxml2argvtest.c: update for qemudBuildCommandLine() change
      05d377bd
  13. 08 7月, 2009 4 次提交
    • J
      remove all .cvsignore files · fb98f4b1
      Jim Meyering 提交于
      fb98f4b1
    • J
      fix another failing "make distcheck" (qemuhelptest) · aef97468
      Jim Meyering 提交于
      It failed in a non-srcdir build because those 5 sample output
      files were not included in the distribution tarball.  Include them.
      * tests/Makefile.am (qemuhelpdata, EXTRA_DIST): Include these:
      kvm-74, kvm-86, qemu-0.10.5, qemu-0.9.1, qemu-kvm-0.10.5.
      aef97468
    • D
      Make it easier to debug tests running programs · 561e6073
      Daniel P. Berrange 提交于
      	* tests/testutils.c: Don't discard stderr when running
      	external programs during tests
      561e6073
    • D
      Support <video> element for QEMU guests · ad6d5acb
      Daniel P. Berrange 提交于
      	* src/qemu_conf.c, src/qemu_conf.h: Use -vga or -std-vga
      	when starting guests if video card is present
      	* tests/qemuhelptest.c: Change to use constants instead
      	of hardcoded hex numbers, and add VGA support
      	* tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml,
      	tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args,
      	tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml,
      	tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.args,
      	tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml,
      	tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml,
      	tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml,
      	tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml: Add <video>
      	element for testing graphics adapter
      	* tests/qemuxml2argvtest.c: Add QEMUD_CMD_FLAG_VGA flag
      	* tests/qemuxml2xmltest.c: Add missing graphics-vnc-sasl/tls tests
      ad6d5acb
  14. 19 6月, 2009 1 次提交
    • D
      extend the configuration parser for VMX syntax · 144276aa
      Daniel Veillard 提交于
      * qemud/qemud.c src/conf.c src/conf.h src/qemu_conf.c src/xen_unified.c
        src/xm_internal.c tests/conftest.c tests/xmconfigtest.c: extend
        the configuration parser for VMX syntax, patch by Matthias Bolte
      Daniel
      144276aa
  15. 17 6月, 2009 1 次提交
  16. 16 6月, 2009 2 次提交
  17. 11 6月, 2009 2 次提交