提交 3cee4c05 编写于 作者: G Guido Günther

qemuxml2argvtest: Don't use privileged mode upfront

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 privileged 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.
上级 064f49a0
...@@ -499,9 +499,11 @@ mymain(void) ...@@ -499,9 +499,11 @@ mymain(void)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
driver.config = virQEMUDriverConfigNew(true); driver.config = virQEMUDriverConfigNew(false);
if (driver.config == NULL) if (driver.config == NULL)
return EXIT_FAILURE; return EXIT_FAILURE;
else
driver.config->privileged = true;
VIR_FREE(driver.config->spiceListen); VIR_FREE(driver.config->spiceListen);
VIR_FREE(driver.config->vncListen); VIR_FREE(driver.config->vncListen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册