mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-30 16:35:24 +00:00
tests: Set the QEMU driver as privileged in common code
Most test programs were already doing this, and moving it to the common code ensures we see consistent behavior across all QEMU tests. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
156cdf1967
commit
d3fe9cc0f0
@ -51,8 +51,6 @@ mymain(void)
|
||||
if (qemuTestDriverInit(&driver) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
driver.privileged = true;
|
||||
|
||||
# define DO_TEST(name, memlock) \
|
||||
do { \
|
||||
static struct testInfo info = { \
|
||||
|
@ -413,8 +413,6 @@ mymain(void)
|
||||
if (qemuTestDriverInit(&driver) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
driver.privileged = true;
|
||||
|
||||
if (!(conn = virGetConnect()))
|
||||
goto cleanup;
|
||||
|
||||
|
@ -87,8 +87,6 @@ mymain(void)
|
||||
if (qemuTestDriverInit(&driver) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
driver.privileged = true;
|
||||
|
||||
if (!(conn = virGetConnect()))
|
||||
goto cleanup;
|
||||
|
||||
|
@ -830,8 +830,6 @@ mymain(void)
|
||||
linuxCaps = driver.caps;
|
||||
macOSCaps = testQemuCapsInitMacOS();
|
||||
|
||||
driver.privileged = true;
|
||||
|
||||
VIR_FREE(driver.config->defaultTLSx509certdir);
|
||||
driver.config->defaultTLSx509certdir = g_strdup("/etc/pki/qemu");
|
||||
VIR_FREE(driver.config->vncTLSx509certdir);
|
||||
|
@ -148,7 +148,6 @@ mymain(void)
|
||||
macOSCaps = testQemuCapsInitMacOS();
|
||||
|
||||
cfg = virQEMUDriverGetConfig(&driver);
|
||||
driver.privileged = true;
|
||||
|
||||
VIR_FREE(cfg->nvramDir);
|
||||
cfg->nvramDir = g_strdup("/var/lib/libvirt/qemu/nvram");
|
||||
|
@ -683,6 +683,8 @@ int qemuTestDriverInit(virQEMUDriver *driver)
|
||||
|
||||
qemuTestSetHostCPU(driver, driver->hostarch, NULL);
|
||||
|
||||
driver->privileged = true;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
Loading…
x
Reference in New Issue
Block a user