[PATCH] qemuxml2argvtest: Don't use privilged mode upfront

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When building packages in a clean chroot the QEMU_USER and QEMU_GROUP
don't exist making VirQemuDriverConfigNew fail with privileged=true.

Avoid that by not requiring priviliged mode upfront but setting it later
so we skip the user/group existence check.

This solution was suggested by Daniel P. Berrange and tested by Martin
Kletzander.
---

 tests/qemuxml2argvtest.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a1ef2b8..14482fd 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -499,9 +499,11 @@ mymain(void)
         return EXIT_FAILURE;
     }
 
-    driver.config = virQEMUDriverConfigNew(true);
+    driver.config = virQEMUDriverConfigNew(false);
     if (driver.config == NULL)
         return EXIT_FAILURE;
+    else
+        driver.config->privileged = true;
 
     VIR_FREE(driver.config->spiceListen);
     VIR_FREE(driver.config->vncListen);
-- 
1.9.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]