1. 20 10月, 2010 2 次提交
    • E
      vcpu: improve vcpu support in xen command line · 0fab10e5
      Eric Blake 提交于
      This patch series focuses on xendConfigVersion 2 (xm_internal) and 3
      (xend_internal), but leaves out changes for xenapi drivers.
      
      See this link for more details about vcpu_avail for xm usage.
      http://lists.xensource.com/archives/html/xen-devel/2009-11/msg01061.html
      
      This relies on the fact that def->maxvcpus can be at most 32 with xen.
      
      * src/xen/xend_internal.c (xenDaemonParseSxpr)
      (sexpr_to_xend_domain_info, xenDaemonFormatSxpr): Use vcpu_avail
      when current vcpus is less than maximum.
      * src/xen/xm_internal.c (xenXMDomainConfigParse)
      (xenXMDomainConfigFormat): Likewise.
      * tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr: New file.
      * tests/sexpr2xmldata/sexpr2xml-pv-vcpus.sexpr: Likewise.
      * tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml: Likewise.
      * tests/xmconfigdata/test-paravirt-vcpu.cfg: Likewise.
      * tests/xmconfigdata/test-paravirt-vcpu.xml: Likewise.
      * tests/xml2sexprtest.c (mymain): New test.
      * tests/sexpr2xmltest.c (mymain): Likewise.
      * tests/xmconfigtest.c (mymain): Likewise.
      0fab10e5
    • E
      vcpu: improve vcpu support in qemu command line · d67c189e
      Eric Blake 提交于
      * src/qemu/qemu_conf.c (qemuParseCommandLineSmp): Distinguish
      between vcpus and maxvcpus, for new enough qemu.
      * tests/qemuargv2xmltest.c (mymain): Add new test.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2xmltest.c (mymain): Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-smp.args: New file.
      d67c189e
  2. 19 10月, 2010 2 次提交
    • E
      vcpu: add current attribute to <vcpu> element · a74f4e44
      Eric Blake 提交于
      Syntax agreed on in
      https://www.redhat.com/archives/libvir-list/2010-September/msg00476.html
      
      <domain ...>
        <vcpu current='x'>y</vcpu>
      ...
      
      can now be used to specify 1 <= x <= y current vcpus, in relation
      to the boot-time max of y vcpus.  If current is omitted, then
      current and max are assumed to be the same value.
      
      * docs/schemas/domain.rng: Add new attribute.
      * docs/formatdomain.html.in: Document it.
      * tests/qemuxml2argvdata/qemuxml2argv-smp.xml: Add to
      domainschematest.
      * tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml: Likewise.
      a74f4e44
    • M
      esx: Handle non-UTF-8 encoded VMX files · 1c616489
      Matthias Bolte 提交于
      ESX(i) uses UTF-8, but a Windows based GSX server writes
      Windows-1252 encoded VMX files.
      
      Add a test case to ensure that libxml2 provides Windows-1252
      to UTF-8 conversion.
      1c616489
  3. 16 10月, 2010 1 次提交
  4. 15 10月, 2010 2 次提交
  5. 14 10月, 2010 4 次提交
  6. 13 10月, 2010 5 次提交
    • D
      Enable support for nested SVM · f98a6cd6
      Daniel P. Berrange 提交于
      This enables support for nested SVM using the regular CPU
      model/features block. If the CPU model or features include
      'svm', then the '-enable-nesting' flag will be added to the
      QEMU command line. Latest out of tree patches for nested
      'vmx', no longer require the '-enable-nesting' flag. They
      instead just look at the cpu features. Several of the models
      already include svm support, but QEMU was just masking out
      the svm bit silently. So this will enable SVM on such
      models
      
      * src/qemu/qemu_conf.h: flag for -enable-nesting
      * src/qemu/qemu_conf.c: Use -enable-nesting if VMX or SVM are in
        the CPUID
      * src/cpu/cpu.h, src/cpu/cpu.c: API to check for a named feature
      * src/cpu/cpu_x86.c: x86 impl of feature check
      * src/libvirt_private.syms: Add cpuHasFeature
      * src/qemuhelptest.c: Add nesting flag where required
      f98a6cd6
    • D
      Improve error reporting in test suites · 80aa7660
      Daniel P. Berrange 提交于
      Before running each test case clear the thread local error
      indicator. After running each test case, dispatch any error
      that was reported
      
      * tests/testutils.c: Fix error reporting in test suites
      80aa7660
    • D
      Fix Xen SEXPR generation to properly quote strings containing () · 3a092f38
      Daniel P. Berrange 提交于
      * src/xen/sexpr.c: Ensure () are escaped in sexpr2string
      * tests/sexpr2xmldata/sexpr2xml-boot-grub.sexpr,
        tests/sexpr2xmldata/sexpr2xml-boot-grub.xml,
        tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr,
        tests/xml2sexprdata/xml2sexpr-boot-grub.xml: Data files to
        check escaping
      * tests/sexpr2xmltest.c, tests/xml2sexprtest.c: Add boot-grub
        escaping test case
      3a092f38
    • D
      Implement support for virtio plan9fs filesystem passthrough in QEMU · a5c646a7
      Daniel P. Berrange 提交于
      Make use of the existing <filesystem> element to support plan9fs
      filesystem passthrough in the QEMU driver
      
          <filesystem type='mount'>
            <source dir='/export/to/guest'/>
            <target dir='/import/from/host'/>
          </filesystem>
      
      NB, the target is not actually a directory, it is merely a arbitrary
      string tag that is exported to the guest as a hint for where to mount
      it.
      a5c646a7
    • N
      XML parsing for memory tunables · d390fce4
      Nikunj A. Dadhania 提交于
      Adding parsing code for memory tunables in the domain xml file
      also change the internal define structures used for domain memory
      informations
      Adds a new specific test
      d390fce4
  7. 07 10月, 2010 1 次提交
  8. 02 10月, 2010 1 次提交
    • M
      esx: Add support for virtual serial device network backing · 02e11b83
      Matthias Bolte 提交于
      Since version 4.1 ESX(i) can expose virtual serial devices over TCP.
      
      Add support in the VMX handling code for this, add test cases to cover
      it and add links to some documentation.
      
      ESX supports two additional protocols: TELNETS and TLS. Add them to
      the list of serial-over-TCP protocols.
      02e11b83
  9. 01 10月, 2010 3 次提交
    • J
      virt-aa-helper-test cleanups · 091075a3
      Jamie Strandboge 提交于
      Don't cat | sed, just sed.  Suggested by Eric Blake.
      091075a3
    • J
      implement usb and pci hot attach in AppArmor driver · 593e0072
      Jamie Strandboge 提交于
      Description: Implement AppArmorSetSecurityHostdevLabel() and
      AppArmorRestoreSecurityHostdevLabel() for hostdev and pcidev attach.
      
      virt-aa-helper also has to be adjusted because *FileIterate() is used for pci
      and usb devices and the corresponding XML for hot attached hostdev and pcidev
      is not in the XML passed to virt-aa-helper. The new '-F filename' option is
      added to append a rule to the profile as opposed to the existing '-f
      filename', which rewrites the libvirt-<uuid>.files file anew. This new '-F'
      option will append a rule to an existing libvirt-<uuid>.files if it exists,
      otherwise it acts the same as '-f'.
      
      load_profile() and reload_profile() have been adjusted to add an 'append'
      argument, which when true will use '-F' instead of '-f' when executing
      virt-aa-helper.
      
      All existing calls to load_profile() and reload_profile() have been adjusted
      to use the old behavior (ie append==false) except AppArmorSetSavedStateLabel()
      where it made sense to use the new behavior.
      
      This patch also adds tests for '-F'.
      
      Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/640993
      593e0072
    • S
      nwfilter: Add a test case for testing the comment attribute · f0954246
      Stefan Berger 提交于
      This patch adds a test case for testing the XML parser's and instantiator's
      support of the comment attribute.
      f0954246
  10. 24 9月, 2010 2 次提交
  11. 23 9月, 2010 1 次提交
  12. 17 9月, 2010 2 次提交
    • E
      tests: silence qemuargv2xmltest noise · 9e3525df
      Eric Blake 提交于
      Before this patch, the testsuite was noisy:
      
      TEST: qemuargv2xmltest
            ........................................ 40
            ................20:41:28.046: warning : qemuParseCommandLine:6565 : unknown QEMU argument '-unknown', adding to the qemu namespace
      20:41:28.046: warning : qemuParseCommandLine:6565 : unknown QEMU argument 'parameter', adding to the qemu namespace
      .                        57  OK
      PASS: qemuargv2xmltest
      
      It's not a real failure (which is why the test was completing
      successfully), so much as an intentional warning to the user that use
      of the qemu namespace has the potential for undefined effects that
      leaked through the default logging behavior.  After this patch series,
      all tests can access any logged data, and this particular test can
      explicitly check for the presence or absence of the warning, such that
      the test output becomes:
      
      TEST: qemuargv2xmltest
            ........................................ 40
            .................                        57  OK
      PASS: qemuargv2xmltest
      
      * tests/testutils.h (virtTestLogContentAndReset): New prototype.
      * tests/testutils.c (struct virtTestLogData): New struct.
      (virtTestLogOutput, virtTestLogClose, virtTestLogContentAndReset):
      New functions.
      (virtTestMain): Always capture log data emitted during tests.
      * tests/qemuargv2xmltest.c (testCompareXMLToArgvHelper, mymain):
      Use flag to mark which tests expect noisy stderr.
      (testCompareXMLToArgvFiles): Add parameter to test whether stderr
      was appropriately silent.
      9e3525df
    • E
      tests: clean up qemuargv2xmltest · 10c59280
      Eric Blake 提交于
      Since commit 107a7bd0, the extraFlags argument was unused.
      
      * tests/qemuargv2xmltest.c (DO_TEST): Drop extraFlags argument.
      Adjust all callers.
      10c59280
  13. 14 9月, 2010 1 次提交
    • E
      build: use portable sed expressions · 249a5b35
      Eric Blake 提交于
      * src/Makefile.am (libvirt.def, libvirt_qemu.def): '\}' and '\t'
      are not required by POSIX.  Use '}' and literal tab instead.
      (install-data-local): Avoid sed -i.
      * tests/read-bufsiz: Likewise.
      Reported by Mitchell Hashimoto.
      249a5b35
  14. 13 9月, 2010 1 次提交
  15. 10 9月, 2010 1 次提交
    • C
      buf: Fix possible infinite loop in EscapeString, VSnprintf · 18af6f4e
      Cole Robinson 提交于
      The current code will go into an infinite loop if the printf generated
      string is >= 1000, AND exactly 1 character smaller than the amount of free
      space in the buffer. When this happens, we are dropped into the loop body,
      but nothing will actually change, because count == (buf->size - buf->use - 1),
      and virBufferGrow returns unchanged if count < (buf->size - buf->use)
      
      Fix this by removing the '- 1' bit from 'size'. The *nprintf functions handle
      the NULL byte for us anyways, so we shouldn't need to manually accommodate
      for it.
      
      Here's a bug where we are actually hitting this issue:
      https://bugzilla.redhat.com/show_bug.cgi?id=602772
      
      v2: Eric's improvements: while -> if (), remove extra va_list variable,
          make sure we report buffer error if snprintf fails
      
      v3: Add tests/virbuftest which reproduces the infinite loop before this
          patch, works correctly after
      18af6f4e
  16. 03 9月, 2010 1 次提交
    • M
      esx: Rework datastore path parsing and handling · 84768912
      Matthias Bolte 提交于
      Instead of splitting the path part of a datastore path into
      directory and file name, keep this in one piece. An example:
      
        "[datastore] directory/file"
      
      was split into this before:
      
        datastoreName = "datastore"
        directoryName = "directory"
        fileName = "file"
      
      Now it's split into this:
      
        datastoreName = "datastore"
        directoryName = "directory"
        directoryAndFileName = "directory/file"
      
      This simplifies code using esxUtil_ParseDatastorePath, because
      directoryAndFileName is used more often than fileName. Also the
      old approach expected the datastore path to reference an actual
      file, but this isn't always correct, especially when listing
      volumes. In that case esxUtil_ParseDatastorePath is used to parse
      a path that references a directory. This fails for a vpx://
      connection because the vCenter returns directory paths with a
      trailing '/'. The new approach is robust against this and the
      actual decision if the datastore path should reference a file or
      a directory is up to the caller of esxUtil_ParseDatastorePath.
      
      Update the tests accordingly.
      84768912
  17. 31 8月, 2010 2 次提交
  18. 24 8月, 2010 4 次提交
    • J
      xen tests: Fix PV-VFB tests with RHEL-5 API · bb6543aa
      Jiri Denemark 提交于
      RHEL-5 Xen doesn't support the old style vnc configuration. In sexpr, we
      can't really check it with rhel5-api turned on. However, for XM
      configuration files it's sufficient to use cfg version 1 instead of 2.
      bb6543aa
    • J
      xml2sexprtest: Remove graphics from unrelated tests · e27277eb
      Jiri Denemark 提交于
      This caused unnecessary make check failures when libvirt is configured
      --with-rhel5-api
      e27277eb
    • J
      xen tests: Fix missing "type ioemu" with rhel5-api · 20311a9a
      Jiri Denemark 提交于
      The most common cause of errors with rhel5-api turn on was missing
      "(type ioemu)" in sexpr or its equivalent in XM configuration file. This
      happens because the presence of that part in sexpr (or cfg) depends on
      xen version the host is running. Let's avoid it by explicitly specifying
      interface model which ensures "type ioemu" will always be emitted.
      
      This patch adds
      
          <model type='e1000'/>
      
      withing the interface element in all affected xml files. And
      
          (model 'e1000')
      
      to all corresponding sexpr files with similar fix to cfg files. Such
      configuration works regardless on Xen version.
      20311a9a
    • J
      nodeinfotest: Print libvirt error on failure · 0eb009d2
      Jiri Denemark 提交于
      If linuxNodeInfoCPUPopulate() fails, the test would just print "FAILED"
      which is not very informative. It's better to print the real error.
      0eb009d2
  19. 20 8月, 2010 1 次提交
    • P
      storage: add support for Vendor and Model in XML · 20be699e
      Patrick Dignan 提交于
      I wrote a patch to add support for listing the Vendor and Model of a
      storage pool in the storage pool XML.  This would allow vendor
      extensions of specific devices.  The patch includes a test for the new
      attributes as well.
      
      Patrick Dignan
      20be699e
  20. 15 8月, 2010 1 次提交
  21. 11 8月, 2010 1 次提交
    • M
      esx: Split VMX code into a general and an ESX specific part · 3de82455
      Matthias Bolte 提交于
      Introduce esxVMX_Context containing functions pointers to
      glue both parts together in a generic way.
      
      Move the ESX specific part to esx_driver.c.
      
      This is a step towards making the VMX code reusable in a
      potential VMware Workstation and VMware Player driver.
      3de82455
  22. 10 8月, 2010 1 次提交