mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: Add test cases for previous commit
This commit is rather big. Firstly, the in memory config representation is adjusted like if security_driver was set to "none". The rest is then just adaptation to the new code that will generate different seclabels. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -252,6 +252,16 @@ virCapsPtr testQemuCapsInit(void)
|
||||
false, false)) == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Add dummy 'none' security_driver. This is equal to setting
|
||||
* security_driver = "none" in qemu.conf. */
|
||||
if (VIR_ALLOC_N(caps->host.secModels, 1) < 0)
|
||||
goto cleanup;
|
||||
caps->host.nsecModels = 1;
|
||||
|
||||
if (VIR_STRDUP(caps->host.secModels[0].model, "none") < 0 ||
|
||||
VIR_STRDUP(caps->host.secModels[0].doi, "0") < 0)
|
||||
goto cleanup;
|
||||
|
||||
if ((caps->host.cpu = virCPUDefCopy(&host_cpu)) == NULL ||
|
||||
(machines = testQemuAllocMachines(&nmachines)) == NULL)
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user