1. 22 3月, 2013 6 次提交
  2. 21 3月, 2013 1 次提交
  3. 20 3月, 2013 2 次提交
    • O
      qemu: add dtb option support · 0b3509e2
      Olivia Yin 提交于
      The "dtb" option sets the filename for the device tree.
      If without this option support, "-dtb file" will be converted into
      <qemu:commandline> in domain XML file.
      For example, '-dtb /media/ram/test.dtb' will be converted into
        <qemu:commandline>
          <qemu:arg value='-dtb'/>
          <qemu:arg value='/media/ram/test.dtb'/>
        </qemu:commandline>
      
      This is not very friendly.
      This patchset add special <dtb> tag like <kernel> and <initrd>
      which is easier for user to write domain XML file.
        <os>
          <type arch='ppc' machine='ppce500v2'>hvm</type>
          <kernel>/media/ram/uImage</kernel>
          <initrd>/media/ram/ramdisk</initrd>
          <dtb>/media/ram/test.dtb</dtb>
          <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline>
        </os>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0b3509e2
    • G
      rename tests/conftest.c · 1cd2078c
      Gene Czarcinski 提交于
      To prevent confusion with configure's popular name
      for a file, rename conftest.c to test_conf.c which
      is consistent with the invoking test_conf.sh
      Signed-off-by: NGene Czarcinski <gene@czarc.net>
      1cd2078c
  4. 19 3月, 2013 1 次提交
  5. 16 3月, 2013 4 次提交
  6. 15 3月, 2013 2 次提交
  7. 14 3月, 2013 4 次提交
    • E
      qemu: detect multi-head qxl via more than version check · 5ac846e4
      Eric Blake 提交于
      Multi-head QXL support is so useful that distros have started to
      backport it to qemu earlier than 1.2.  After discussion with
      Alon Levy, we determined that the existence of the qxl-vga.surfaces
      property is a reliable indicator of whether '-device qxl-vga' works,
      or whether we have to stick to the older '-vga qxl'.  I'm leaving
      in the existing check for QEMU_CAPS_DEVICE_VIDEO_PRIMARY tied to
      qemu 1.2 and newer (in case qemu is built without qxl support),
      but for those distros that backport qxl, this additional capability
      check will allow the correct command line for both RHEL 6.3 (which
      lacks the feature) and RHEL 6.4 (where qemu still claims to be
      version 0.12.2.x, but has backported multi-head qxl).
      
      * src/qemu/qemu_capabilities.c (virQEMUCapsObjectPropsQxlVga): New
      property test.
      (virQEMUCapsExtractDeviceStr): Probe for backport of new
      capability to qemu earlier than 1.2.
      * tests/qemuhelpdata/qemu-kvm-1.2.0-device: Update test.
      * tests/qemuhelpdata/qemu-1.2.0-device: Likewise.
      * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel62-beta-device:
      Likewise.
      5ac846e4
    • D
      Fix parsing of SELinux ranges without a category · 1732c1c6
      Daniel P. Berrange 提交于
      Normally libvirtd should run with a SELinux label
      
        system_u:system_r:virtd_t:s0-s0:c0.c1023
      
      If a user manually runs libvirtd though, it is sometimes
      possible to get into a situation where it is running
      
        system_u:system_r:init_t:s0
      
      The SELinux security driver isn't expecting this and can't
      parse the security label since it lacks the ':c0.c1023' part
      causing it to complain
      
        internal error Cannot parse sensitivity level in s0
      
      This updates the parser to cope with this, so if no category
      is present, libvirtd will hardcode the equivalent of c0.c1023.
      
      Now this won't work if SELinux is in Enforcing mode, but that's
      not an issue, because the user can only get into this problem
      if in Permissive mode. This means they can now start VMs in
      Permissive mode without hitting that parsing error
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1732c1c6
    • P
      virtio-rng: Add rate limiting options for virtio-RNG · 32bd699f
      Peter Krempa 提交于
      Qemu's implementation of virtio RNG supports rate limiting of the
      entropy used. This patch exposes the option to tune this functionality.
      
      This patch is based on qemu commit 904d6f588063fb5ad2b61998acdf1e73fb4
      
      The rate limiting is exported in the XML as:
      <devices>
        ...
        <rng model='virtio'>
          <rate bytes='123' period='1234'/>
          <backend model='random'/>
        </rng>
        ...
      32bd699f
    • V
      S390: Testcases for virtio-ccw machines · 3eefaccd
      Viktor Mihajlovski 提交于
      This adds and corrects testcases for virtio devices on s390
      guests.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      3eefaccd
  8. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  9. 09 3月, 2013 1 次提交
  10. 07 3月, 2013 1 次提交
  11. 05 3月, 2013 2 次提交
    • E
      rng: restrict passthrough names to known-good files · 4932ef45
      Eric Blake 提交于
      There is some controversy[1] on the qemu list on whether qemu should
      have ever allowed arbitrary file name passthrough, or whether it
      should be restricted to JUST /dev/random and /dev/hwrng.  It is
      always easier to add support for additional filenames than it is
      to remove support for something once released, so this patch
      restricts libvirt 1.0.3 (where the virtio-random backend was first
      supported) to just the two uncontroversial names, letting us defer
      to a later date any decision on whether supporting arbitrary files
      makes sense. Additionally, since qemu 1.4 does NOT support
      /dev/fdset/nnn fd passthrough for the backend, limiting to just
      two known names means that we don't get tempted to try fd
      passthrough where it won't work.
      
      [1]https://lists.gnu.org/archive/html/qemu-devel/2013-03/threads.html#00023
      
      * src/conf/domain_conf.c (virDomainRNGDefParseXML): Only allow
      /dev/random and /dev/hwrng.
      * docs/schemas/domaincommon.rng: Flag invalid files.
      * docs/formatdomain.html.in (elementsRng): Document this.
      * tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.args:
      Update test to match.
      * tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml:
      Likewise.
      4932ef45
    • D
      Fix TLS tests with gnutls 3 · 0204d6d7
      Daniel P. Berrange 提交于
      When given a CA cert with basic constraints to set non-critical,
      and key usage of 'key signing', this should be rejected. Version
      of GNUTLS < 3 do not rejecte it though, so we never noticed the
      test case was broken
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0204d6d7
  12. 27 2月, 2013 6 次提交
    • L
      Revert "Add support for <option> tag in network config" · db2536a6
      Laine Stump 提交于
      This reverts commit 383ebc46.
      
      We decided the xml for this feature needed more thought to make sure
      we are doing it the best way, in particular wrt option values that
      have multiple items.
      db2536a6
    • P
      tests: Test XML entities in source path for RNG device · 2ab08e6c
      Peter Krempa 提交于
      Users may want to specify XML entities in paths to devices. Ensure they
      are parsed and used properly.
      2ab08e6c
    • J
      tests: fix leaks in storagevolxml2argvtest · ecc17eb4
      Ján Tomko 提交于
      Reported by John Ferlan.
      ecc17eb4
    • E
      tests: skip virstoragetest on RHEL 5 · 9194679e
      Eric Blake 提交于
      virstoragetest was failing on RHEL 5, but with no good error message:
      
      TEST: virstoragetest
                                              0   FAIL
      
      It turns out that qemu-img was so old, that it lacked support for
      -o backing_file.  It didn't help that the test was also using
      qemu-img from PATH, even after first probing for kvm-img.
      
      * tests/virstoragetest.c (testPrepImages): Consistently use
      discovered binary.  Skip instead of fail if qemu-img fails during
      setup.
      9194679e
    • E
      tests: old automake lacks abs_builddir · b6176e52
      Eric Blake 提交于
      On RHEL 5, 'make check' included failures such as:
      
      TEST: virstoragetest
      unable to create directory /virstoragedata/sub
      unable to return to correct directory, refusing to clean up /virstoragedata
      
      It turns out that with automake 1.9.x, $(abs_builddir) is not
      automatically provided.  We have previously worked around this
      by using `pwd` before, but because we did not do it everywhere,
      we had a number of broken tests.
      
      This patch brings RHEL 5 from 8 failed tests down to 5 (the
      remaining failures may be due to bugs in the older libxml2 and
      RNG schema validation available in RHEL 5, so I'm not sure if
      they can be fixed in libvirt, but I'm still investigating).
      
      * tests/Makefile.am (AM_CFLAGS): Reliably set abs_builddir.
      (*_la_CFLAGS): Factor out common settings; delete when nothing
      remains to be added.
      b6176e52
    • E
      tests: consistent skip messages · eb41338e
      Eric Blake 提交于
      On RHEL 5, I noticed this test failure message:
      
      TEST: qemumonitorjsontest
      libvirt not compiled with yajl, skippingSKIP: qemumonitorjsontest
      
      * tests/virstoragetest.c (testPrepImages): Use simpler fputs.
      * tests/qemumonitorjsontest.c (mymain): Ensure trailing newline.
      eb41338e
  13. 26 2月, 2013 3 次提交
    • E
      tests: uniformly report test failures · dce95297
      Eric Blake 提交于
      testutils.c likes to print summaries after a test completes,
      including if it failed.  But if the test outright exit()s,
      this summary is skipped.  Enforce that we return instead of exit.
      
      * cfg.mk (sc_prohibit_exit_in_tests): New syntax check.
      * tests/commandhelper.c (main): Fix offenders.
      * tests/qemumonitorjsontest.c (mymain): Likewise.
      * tests/seclabeltest.c (main): Likewise.
      * tests/securityselinuxlabeltest.c (mymain): Likewise.
      * tests/securityselinuxtest.c (mymain): Likewise.
      * tests/testutils.h (VIRT_TEST_MAIN_PRELOAD): Likewise.
      * tests/testutils.c (virtTestMain): Likewise.
      (virtTestCaptureProgramOutput): Use symbolic name.
      dce95297
    • E
      tests: don't test json when not compiled in · f20b0476
      Eric Blake 提交于
      Now that the segfault is solved, we can skip instead of fail
      the test when yajl is not present.
      
      * tests/qemumonitorjsontest.c (mymain): Skip if no yajl.
      f20b0476
    • E
      tests: avoid segfault if json monitor not present · 848a3b1d
      Eric Blake 提交于
      On a machine without yajl headers, I was seeing random segfaults
      from qemumonitorjsontest (about 90% of the runs on my particular
      machine).  The segfault was inside virClassIsDerivedFrom, which
      points to a case of a race leading to unreferencing a stale
      pointer to an object that had already been freed.  I also noticed
      that if I got the segfault, I was seeing messages such as:
      
      2013-02-22 16:12:37.504+0000: 19833: error : virNetSocketWriteWire:1361 : Cannot write data: Bad file descriptor
      
      which is also evidence of deferencing a stale pointer.  I traced it
      to a race where qemuMonitorTestIO could execute late, after the
      main thread had already called qemuMonitorTestFree and called
      virNetSocketClose(test->client) but not clearing it out to NULL.
      Sure enough, after test->client has been closed, fd is -1, which
      causes an attempt to write to the socket to fail, which in turn
      triggers the error code of qemuMonitorTestIO that tries to re-close
      test->client.
      
      * tests/qemumonitortestutils.c (qemuMonitorTestIO): Don't attempt
      to free client again if test already quit.
      848a3b1d
  14. 25 2月, 2013 4 次提交
  15. 23 2月, 2013 1 次提交
  16. 22 2月, 2013 1 次提交