[libvirt PATCH 4/7] qemuhotplugtest: Lock reused virDomainObj

Tim Wiederhake twiederh at redhat.com
Thu Aug 5 13:08:48 UTC 2021


If the previous test had `keep == 1` set, this function inherits its
(unlocked) virDomainObj.

Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 tests/qemuhotplugtest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 57d76845c6..d8d6a3a226 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -280,6 +280,7 @@ testQemuHotplug(const void *data)
 
     if (test->vm) {
         vm = test->vm;
+        virObjectLock(vm);
         if (!vm->def) {
             VIR_TEST_VERBOSE("test skipped due to failure of dependent test");
             goto cleanup;
-- 
2.31.1




More information about the libvir-list mailing list