]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
networkxml2conftest: Check if capabilities were created successfully
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 17 Jan 2022 12:14:45 +0000 (13:14 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Jan 2022 15:18:54 +0000 (16:18 +0100)
Now that looking up dnsmasq is handled/mocked we can start
checking whether dnsmasq capabilities were built successfully and
error out if that wasn't the case.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
tests/networkxml2conftest.c

index 718a031879d8eeb7e93f255752dc908974cf7c4a..0bc9e128e3136badb0749bdcdffea8fbed342984 100644 (file)
@@ -147,7 +147,11 @@ mymain(void)
     int ret = 0;
     g_autoptr(dnsmasqCaps) full = NULL;
 
-    full = buildCaps();
+    if (!(full = buildCaps())) {
+        fprintf(stderr, "failed to create the fake capabilities: %s",
+                virGetLastErrorMessage());
+        return EXIT_FAILURE;
+    }
 
 #define DO_TEST(xname, xcaps) \
     do { \