1. 10 11月, 2015 6 次提交
  2. 09 11月, 2015 1 次提交
    • D
      tests: redo test argv file line wrapping · 8afd34f2
      Daniel P. Berrange 提交于
      Back in
      
        commit bd6c46fa
        Author: Juerg Haefliger <juerg.haefliger@hp.com>
        Date:   Mon Jan 31 06:42:57 2011 -0500
      
          tests: handle backspace-newline pairs in test input files
      
      all the test argv files were line wrapped so that the args
      were less than 80 characters.
      
      The way the line wrapping was done turns out to be quite
      undesirable, because it often leaves multiple parameters
      on the same line. If we later need to add or remove
      individual parameters, then it leaves us having to redo
      line wrapping.
      
      This commit changes the line wrapping so that every
      single "-param value" is one its own new line. If the
      "value" is still too long, then we break on ',' or ':'
      or ' ' as needed.
      
      This means that when we come to add / remove parameters
      from the test files line, the patch diffs will only
      ever show a single line added/removed which will greatly
      simplify review work.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      8afd34f2
  3. 04 11月, 2015 1 次提交
  4. 22 10月, 2015 1 次提交
  5. 21 10月, 2015 1 次提交
  6. 16 10月, 2015 1 次提交
    • J
      qemu: Fix qemu startup check for QEMU_CAPS_OBJECT_IOTHREAD · cc2d49f9
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1249981
      
      When qemuDomainPinIOThread was added in commit id 'fb562614', a check
      for the IOThread capability was not needed since a check for iothreadpids
      covered the condition where the support for IOThreads was not present.
      The iothreadpids array was only created if qemuProcessDetectIOThreadPIDs
      was able to query the monitor for IOThreads. It would only do that if
      the QEMU_CAPS_OBJECT_IOTHREAD capability was set.
      
      However, when iothreadids were added in commit id '8d4614a5' and the
      check for iothreadpids was replaced by a search through the iothreadids[]
      array for the matching iothread_id that left open the possibility that
      an iothreadids[] array was defined, but the entries essentially pointed
      to elements with only the 'iothread_id' defined leaving the 'thread_id'
      value of 0 and eventually the cpumap entry of NULL.
      
      This was because, the original IOThreads commit id '72edaae7' only
      checked if IOThreads were defined and if the emulator had the IOThreads
      capability, then IOThread objects were added at startup. The "capability
      failure" check was only done when a disk was assigned to an IOThread in
      qemuCheckIOThreads. This was because the initial implementation had no way
      to dynamically add IOThreads, but it was possible to dynamically add a
      disk to the domain. So the decision was if the domain supported it, then
      add the IOThread objects. Then if a disk with an IOThread defined was
      added, it could check the capability and fail to add if not there. This
      just meant the 'iothreads' value was essentially ignored.
      
      Eventually commit id 'a27ed6e7' allowed for the dynamic addition and
      deletion of IOThread objects. So it was no longer necessary to generate
      IOThread objects to dynamically attach a disk to. However, the startup
      and disk check code was not modified to reflect this.
      
      This patch will move the capability failure check to when IOThread
      objects are being added to the command line. Thus a domain that has
      IOThreads defined will not be started if the emulator doesn't support
      the capability. This means when qemuCheckIOThreads is called to add
      a disk, it's no longer necessary to check the capability. Instead the
      code can use the IOThreadFind call to indicate that the IOThread
      doesn't exist.
      
      Finally because it could be possible to have a domain running with the
      iothreadids[] defined prior to this change if libvirtd is restarted each
      having mostly empty elements, qemuProcessDetectIOThreadPIDs will check
      if there are niothreadids when the QEMU_CAPS_OBJECT_IOTHREAD capability
      check fails and remove the elements and array if it exists.
      
      With these changes in place, it turns out the cputune-numatune test
      was failing because the right bit wasn't set in the test. So used the
      opportunity to fix that and create a test that would expect to fail
      with some sort of iothreads defined and used, but not having the
      correct capability.
      cc2d49f9
  7. 14 10月, 2015 1 次提交
  8. 07 10月, 2015 2 次提交
  9. 06 10月, 2015 7 次提交
  10. 02 10月, 2015 3 次提交
  11. 26 9月, 2015 2 次提交
    • S
      qemu: Make virtType of type virDomainVirtType · 7383b8cc
      Shivangi Dhir 提交于
      Earlier virtType was of type int. After, introducing the enum VIR_DOMAIN_VIRT_NONE,
      the type of virtType is modified to virDomainVirtType.
      7383b8cc
    • S
      conf: Add new VIR_DOMAIN_VIRT_NONE enum · 62569e45
      Shivangi Dhir 提交于
      Introduce VIR_DOMAIN_VIRT_NONE to give domaintype the default value of zero.
      This is specially helpful in constructing better error messages
      when we don't want to look up the default emulator by virtType.
      
      The test data in vircapstest.c is also modified to reflect this change.
      62569e45
  12. 24 9月, 2015 2 次提交
  13. 23 9月, 2015 1 次提交
    • P
      qemu: Align memory module sizes to 2MiB · 624ec1c2
      Peter Krempa 提交于
      My original implementation was based on a qemu version that still did
      not have all the checks in place. Using sizes that would align to odd
      megabyte increments will produce the following error:
      
      qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,id=dimm0: backend memory size must be multiple of 0x200000
      qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,id=dimm0: Device 'pc-dimm' could not be initialized
      
      Introduce an alignment retrieval function for memory devices and use it
      to align the devices separately and modify a test case to verify it.
      624ec1c2
  14. 22 9月, 2015 9 次提交
    • M
      tests: Avoid use of virQEMUDriverCreateXMLConf(NULL) · 086f37e9
      Michal Privoznik 提交于
      We use the function to create a virDomainXMLOption object that is
      required for some functions. However, we don't pass the driver
      pointer to the object anywhere - rather than pass NULL. This
      causes trouble later when parsing a domain XML and calling post
      parse callbacks:
      
        Program received signal SIGSEGV, Segmentation fault.
        0x000000000043fa3e in qemuDomainDefPostParse (def=0x7d36c0, caps=0x7caf10, opaque=0x0) at qemu/qemu_domain.c:1043
        1043        qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
        (gdb) bt
        #0  0x000000000043fa3e in qemuDomainDefPostParse (def=0x7d36c0, caps=0x7caf10, opaque=0x0) at qemu/qemu_domain.c:1043
        #1  0x00007ffff2928bf9 in virDomainDefPostParse (def=0x7d36c0, caps=0x7caf10, xmlopt=0x7c82c0) at conf/domain_conf.c:4269
        #2  0x00007ffff294de04 in virDomainDefParseXML (xml=0x7da8c0, root=0x7dab80, ctxt=0x7da980, caps=0x7caf10, xmlopt=0x7c82c0, flags=0) at conf/domain_conf.c:16400
        #3  0x00007ffff294e5b5 in virDomainDefParseNode (xml=0x7da8c0, root=0x7dab80, caps=0x7caf10, xmlopt=0x7c82c0, flags=0) at conf/domain_conf.c:16582
        #4  0x00007ffff294e424 in virDomainDefParse (xmlStr=0x0, filename=0x7c7ef0 "/home/zippy/work/libvirt/libvirt.git/tests/securityselinuxlabeldata/disks.xml", caps=0x7caf10, xmlopt=0x7c82c0, flags=0) at conf/domain_conf.c:16529
        #5  0x00007ffff294e4b2 in virDomainDefParseFile (filename=0x7c7ef0 "/home/zippy/work/libvirt/libvirt.git/tests/securityselinuxlabeldata/disks.xml", caps=0x7caf10, xmlopt=0x7c82c0, flags=0) at conf/domain_conf.c:16553
        #6  0x00000000004303ca in testSELinuxLoadDef (testname=0x53c929 "disks") at securityselinuxlabeltest.c:192
        #7  0x00000000004309e8 in testSELinuxLabeling (opaque=0x53c929) at securityselinuxlabeltest.c:313
        #8  0x0000000000431207 in virtTestRun (title=0x53c92f "Labelling \"disks\"", body=0x430964 <testSELinuxLabeling>, data=0x53c929) at testutils.c:211
        #9  0x0000000000430c5d in mymain () at securityselinuxlabeltest.c:373
        #10 0x00000000004325c2 in virtTestMain (argc=1, argv=0x7fffffffd7e8, func=0x430b4a <mymain>) at testutils.c:863
        #11 0x0000000000430deb in main (argc=1, argv=0x7fffffffd7e8) at securityselinuxlabeltest.c:381
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      086f37e9
    • M
      qemuTestDriverInit: init the driver lock too · b1dc59b3
      Michal Privoznik 提交于
      Even though usage of the lock is limited to a very few cases,
      it's still needed. Therefore we should initialize it too.
      Otherwise we may get some random test failures:
      
      ==1204== Conditional jump or move depends on uninitialised value(s)
      ==1204==    at 0xEF7F7CF: pthread_mutex_lock (in /lib64/libpthread-2.20.so)
      ==1204==    by 0x9CA89A5: virMutexLock (virthread.c:89)
      ==1204==    by 0x450B2A: qemuDriverLock (qemu_conf.c:83)
      ==1204==    by 0x45549C: virQEMUDriverGetConfig (qemu_conf.c:869)
      ==1204==    by 0x448E29: qemuDomainDeviceDefPostParse (qemu_domain.c:1240)
      ==1204==    by 0x9CC9B13: virDomainDeviceDefPostParse (domain_conf.c:4224)
      ==1204==    by 0x9CC9B91: virDomainDefPostParseDeviceIterator (domain_conf.c:4251)
      ==1204==    by 0x9CC7843: virDomainDeviceInfoIterateInternal (domain_conf.c:3440)
      ==1204==    by 0x9CC9C25: virDomainDefPostParse (domain_conf.c:4276)
      ==1204==    by 0x9CEEE03: virDomainDefParseXML (domain_conf.c:16400)
      ==1204==    by 0x9CEF5B4: virDomainDefParseNode (domain_conf.c:16582)
      ==1204==    by 0x9CEF423: virDomainDefParse (domain_conf.c:16529)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b1dc59b3
    • P
    • P
      qemu: ppc64: Align memory sizes to 256MiB blocks · bd874b6c
      Peter Krempa 提交于
      For some machine types ppc64 machines now require that memory sizes are
      aligned to 256MiB increments (due to the dynamically reconfigurable
      memory). As now we treat existing configs reasonably in regards to
      migration, we can round all the sizes unconditionally. The only drawback
      will be that the memory size of a VM can potentially increase by
      (256MiB - 1byte) * number_of_NUMA_nodes.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1249006
      bd874b6c
    • P
      qemu: command: Align memory sizes only on fresh starts · c7d7ba85
      Peter Krempa 提交于
      When we are starting a qemu process for an incomming migration or
      snapshot reloading we should not modify the memory sizes in the domain
      since we could potentially change the guest ABI that was tediously
      checked before. Additionally the function now updates the initial memory
      size according to the NUMA node size, which should not happen if we are
      restoring state.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1252685
      c7d7ba85
    • P
      conf: Drop VIR_DOMAIN_DEF_PARSE_CLOCK_ADJUST flag · ed94ad9e
      Peter Krempa 提交于
      The flag was used only for formatting the XML and once the parser and
      formatter flags were split in 0ecd6851
      it doesn't make sense any more to have it.
      ed94ad9e
    • P
      tests: use mockup cache · 0636c4a8
      Pavel Fedin 提交于
      Use the new API in order to correctly add capability sets to the cache
      before parsing XML files
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      0636c4a8
    • P
      Implement infrastracture for mocking up QEMU capabilities cache · f7dd3357
      Pavel Fedin 提交于
      The main purpose of this patch is to introduce test mode to
      virQEMUCapsCacheLookup(). This is done by adding a global variable, which
      effectively overrides binary name. This variable is supposed to be set by
      test suite.
      
      The second addition is qemuTestCapsCacheInsert() function which allows the
      test suite to actually populate the cache.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      f7dd3357
    • P
      tests: split out common qemu driver initialization · 5b7bf208
      Pavel Fedin 提交于
      Two utility functions are introduced for proper initialization and
      cleanup of the driver.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      5b7bf208
  15. 17 9月, 2015 1 次提交
    • M
      vmx: Expose datacenter path in domain XML · 636a9905
      Matthias Bolte 提交于
      Tool such as libguestfs need the datacenter path to get access to disk
      images. The ESX driver knows the correct datacenter path, but this
      information cannot be accessed using libvirt API yet. Also, it cannot
      be deduced from the connection URI in a robust way.
      
      Expose the datacenter path in the domain XML as <vmware:datacenterpath>
      node similar to the way the <qemu:commandline> node works. The new node
      is ignored while parsing the domain XML. In contrast to <qemu:commandline>
      it is output only.
      636a9905
  16. 16 9月, 2015 1 次提交
    • J
      virfile: Check for existence of dir in virFileDeleteTree · b421a708
      John Ferlan 提交于
      Commit id 'f1f68ca3' added code to remove the directory paths for
      auto-generated sockets, but that code could be called before the
      paths were created resulting in generating error messages from
      virFileDeleteTree indicating that the file doesn't exist.
      
      Rather than "enforce" all callers to make the non-NULL and existence
      checks, modify the virFileDeleteTree API to silently ignore NULL on
      input and non-existent directory trees.
      b421a708