[libvirt] [PATCHv3 18/27] fix fallout in selinux test

Peter Krempa pkrempa at redhat.com
Mon Mar 11 15:06:29 UTC 2013


---
 tests/securityselinuxlabeltest.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c
index 2454772..405bc2b 100644
--- a/tests/securityselinuxlabeltest.c
+++ b/tests/securityselinuxlabeltest.c
@@ -44,6 +44,7 @@
 #define VIR_FROM_THIS VIR_FROM_NONE

 static virCapsPtr caps;
+static virDomainXMLConfPtr xmlconf;

 static virSecurityManagerPtr mgr;

@@ -165,7 +166,7 @@ testSELinuxLoadDef(const char *testname)
         goto cleanup;
     }

-    if (!(def = virDomainDefParseString(caps, xmlstr,
+    if (!(def = virDomainDefParseString(caps, xmlconf, xmlstr,
                                         QEMU_EXPECTED_VIRT_TYPES,
                                         0)))
         goto cleanup;
@@ -327,6 +328,9 @@ mymain(void)
     if ((caps = testQemuCapsInit()) == NULL)
         return EXIT_FAILURE;

+    if (!(xmlconf = virQEMUDriverCreateXMLConf()))
+        return EXIT_FAILURE;
+
 #define DO_TEST_LABELING(name) \
     if (virtTestRun("Labelling " # name, 1, testSELinuxLabeling, name) < 0) \
         ret = -1;                                                       \
-- 
1.8.1.5




More information about the libvir-list mailing list