1. 29 6月, 2020 1 次提交
  2. 20 5月, 2020 3 次提交
  3. 08 5月, 2020 2 次提交
  4. 06 5月, 2020 1 次提交
    • A
      tests: Introduce virhostdevmock · eea5d63a
      Andrea Bolognani 提交于
      We need this for all tests that use virHostdevManager, because
      during creation of this object for unprivileged connections
      like those used in the test suite we would end up writing inside
      the user's home directory.
      
      That's bad manners in general, but when running the test suite
      inside a purposefully constrained environment such as the one
      exposed by pbuilder, it turns into an outright test failure:
      
        Could not initialize HostdevManager - operation failed: Failed
        to create state dir '/nonexistent/.cache/libvirt/hostdevmgr'
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      eea5d63a
  5. 27 4月, 2020 4 次提交
  6. 23 4月, 2020 1 次提交
  7. 13 3月, 2020 1 次提交
    • D
      tests: fix double unlock of monitor in hotplug test · 46e16b55
      Daniel P. Berrangé 提交于
      The qemuMonitorTestNew() function returns with the monitor object
      locked, and expects it to still be locked when qemuMonitorTestFree
      is called.  The qemuhotplug test, however, explicitly unlocks the
      monitor, but then forgets to lock it again. As a result the
      qemuMonitorTestFree function is unlocking a mutex it doesn't own.
      
      This bug has existed forever, but since we use normal POSIX mutexes
      and don't check the return value of pthread_mutex_lock/unlock we
      didn't see the error. It was harmless until the switch to the per
      monitor event loop which requires the thread synchronization to
      work reliably, whereupon it started crashing.
      Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      46e16b55
  8. 12 3月, 2020 1 次提交
  9. 05 3月, 2020 1 次提交
  10. 21 2月, 2020 1 次提交
  11. 22 1月, 2020 1 次提交
  12. 03 1月, 2020 1 次提交
  13. 17 12月, 2019 3 次提交
  14. 13 12月, 2019 1 次提交
  15. 09 12月, 2019 4 次提交
  16. 19 11月, 2019 1 次提交
  17. 15 11月, 2019 3 次提交
    • M
      tests: Mock access to /dev/kvm · 9e4445eb
      Michal Privoznik 提交于
      Some of our tests try to validate domain XMLs they are working
      with (not intentionally, simply because they call top level
      domain XML parse function). Anyway, this implies that we build
      domain capabilities also - see
      virQEMUDriverGetDomainCapabilities(). And since some domain XMLs
      are type of 'kvm' the control gets through
      virQEMUCapsFillDomainCaps() and virHostCPUGetKVMMaxVCPUs() to
      opening /dev/kvm which may be missing on the machine we're
      running 'make check'.
      
      Previously, we did not see this issue, because it was masked. If
      building domain capabilities failed for whatever reason, we
      ignored the failure. Only v5.9.0-207-gc69e6ede uncovered the
      problem (it changed reval from 0 to -1 if
      virQEMUDriverGetDomainCapabilities() fails). Since the referenced
      commit is correct, we need to mock access to /dev/kvm in our
      tests.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9e4445eb
    • J
      Use g_mkdtemp instead of mkdtemp · ef886986
      Ján Tomko 提交于
      Prefer the GLib version to the one from gnulib.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
      ef886986
    • J
      qemu: Set capabilities properly for tests · b9647356
      Jonathon Jongsma 提交于
      Several tests were not specifying the necessary qemu capabilities for
      what they were testing. Due to the way that the video devices are
      currently validated, this is not causing any problems. But a change to
      video device validation in a following patch would have exposed this
      issue and resulted in multiple test failures about the domain
      configuration not supporting particular video models.
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
      b9647356
  18. 14 11月, 2019 2 次提交
    • D
      qemu: Remove qemu_hotplugpriv.h and qemuDomainRemoveDeviceWaitTime · 2fe78a83
      Daniel Henrique Barboza 提交于
      qemu_hotplugpriv.h is a header file created to share a global variable
      called 'qemuDomainRemoveDeviceWaitTime', declared in qemu_hotplug.c,
      to other files that would want to change the timeout value
      (currently, only tests/qemuhotplugtest.c).
      
      Previous patch deprecated the variable, using qemu_driver->unplugTimeout
      to set the timeout instead. This means that the header file is now
      unused, and can be safely discarded.
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      2fe78a83
    • D
      qemu_hotplug.c: adding qemuDomainGetUnplugTimeout · e03e27ee
      Daniel Henrique Barboza 提交于
      For some architectures and setups, device removal can take
      longer than the default 5 seconds. This results in commands
      such as 'virsh setvcpus' to fire timeout messages even if
      the operation were successful in the guest, confusing the
      user.
      
      This patch sets a new 10 seconds unplug timeout for PPC64
      guests. All other archs will keep the default 5 seconds
      timeout.
      
      Instead of putting 'if PPC64' conditionals inside qemu_hotplug.c
      to set the new timeout value, a new function called
      qemuDomainGetUnplugTimeout was added. The timeout value is then
      retrieved when needed, by passing the correspondent DomainDef
      object. This approach allows for different guest architectures
      to have distint unplug timeout intervals, regardless of the
      host architecture. This design also makes it easier to
      modify/enhance the unplug timeout logic in the future
      (allow for special timeouts for TCG domains, for example).
      
      A new mock file was created to work with qemuhotplugtest.c,
      given that the test timeout is significantly shorter than
      the actual timeout value in qemu_hotplug.c.
      
      The now unused 'qemuDomainRemoveDeviceWaitTime' global can't
      be simply erased from qemu_hotplug.c though. Next patch will
      remove it properly.
      Reviewed-by: NCole Robinson <crobinso@redhat.com>
      Suggested-by: NCole Robinson <crobinso@redhat.com>
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      e03e27ee
  19. 12 11月, 2019 1 次提交
  20. 07 11月, 2019 1 次提交
  21. 21 10月, 2019 1 次提交
  22. 16 10月, 2019 1 次提交
  23. 19 9月, 2019 1 次提交
  24. 09 9月, 2019 1 次提交
  25. 27 8月, 2019 1 次提交
  26. 09 8月, 2019 1 次提交
    • J
      qemu: Pass correct qemuCaps to virDomainDeviceDefPostParse · b449c270
      Jiri Denemark 提交于
      Since qemuDomainDeviceDefPostParse callback requires qemuCaps, we need
      to make sure it gets the capabilities stored in the domain's private
      data if the domain is running. Passing NULL may cause QEMU capabilities
      probing to be triggered in case QEMU binary changed in the meantime.
      When this happens while a running domain object is locked, QMP event
      delivered to the domain before QEMU capabilities probing finishes will
      deadlock the event loop.
      
      QEMU capabilities lookup (via domainPostParseDataAlloc callback) is
      hidden inside virDomainDeviceDefPostParseOne with no way to pass
      qemuCaps to virDomainDeviceDef* functions. This patch fixes all
      remaining paths leading to virDomainDeviceDefPostParse.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      b449c270