mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
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 <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2dd1b04014
commit
5e73c89d22
@ -299,7 +299,8 @@ mymain(void)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int rc = testUserXattrEnabled();
|
int rc = testUserXattrEnabled();
|
||||||
g_autoptr(virQEMUCaps) qemuCaps = NULL;
|
g_autoptr(GHashTable) capslatest = testQemuGetLatestCaps();
|
||||||
|
g_autoptr(GHashTable) capscache = virHashNew(virObjectUnref);
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
VIR_TEST_VERBOSE("failed to determine xattr support");
|
VIR_TEST_VERBOSE("failed to determine xattr support");
|
||||||
@ -322,12 +323,10 @@ mymain(void)
|
|||||||
if (qemuTestDriverInit(&driver) < 0)
|
if (qemuTestDriverInit(&driver) < 0)
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
qemuCaps = virQEMUCapsNew();
|
qemuTestSetHostArch(&driver, VIR_ARCH_X86_64);
|
||||||
|
|
||||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_CIRRUS_VGA);
|
if (testQemuInsertRealCaps(driver.qemuCapsCache, "x86_64", "latest", "",
|
||||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC);
|
capslatest, capscache, NULL, NULL) < 0)
|
||||||
|
|
||||||
if (qemuTestCapsCacheInsert(driver.qemuCapsCache, qemuCaps) < 0)
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
#define DO_TEST_LABELING(name) \
|
#define DO_TEST_LABELING(name) \
|
||||||
|
Loading…
Reference in New Issue
Block a user