From: Peter Krempa Date: Tue, 5 Sep 2023 15:02:33 +0000 (+0200) Subject: securityselinuxlabeltest: Convert to testQemuInsertRealCaps X-Git-Tag: v9.8.0-rc1~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e73c89d2237d6d9250b66eb4eec627075deb351;p=thirdparty%2Flibvirt.git securityselinuxlabeltest: Convert to testQemuInsertRealCaps Use the modern infrastructure to populate capabilities cache with real capabilities instead of the faked one which will be soon removed. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c index 30bd68b550..04bffe4356 100644 --- a/tests/securityselinuxlabeltest.c +++ b/tests/securityselinuxlabeltest.c @@ -299,7 +299,8 @@ mymain(void) { int ret = 0; int rc = testUserXattrEnabled(); - g_autoptr(virQEMUCaps) qemuCaps = NULL; + g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps(); + g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref); if (rc < 0) { VIR_TEST_VERBOSE("failed to determine xattr support"); @@ -322,12 +323,10 @@ mymain(void) if (qemuTestDriverInit(&driver) < 0) return EXIT_FAILURE; - qemuCaps = virQEMUCapsNew(); + qemuTestSetHostArch(&driver, VIR_ARCH_X86_64); - virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_CIRRUS_VGA); - virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC); - - if (qemuTestCapsCacheInsert(driver.qemuCapsCache, qemuCaps) < 0) + if (testQemuInsertRealCaps(driver.qemuCapsCache, "x86_64", "latest", "", + capslatest, capscache, NULL, NULL) < 0) return EXIT_FAILURE; #define DO_TEST_LABELING(name) \