From 2fc6adcb30cbe9a80e67529c7058e6279c299f9f Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Mon, 17 Jan 2022 13:14:45 +0100 Subject: [PATCH] networkxml2conftest: Check if capabilities were created successfully 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 Reviewed-by: Andrea Bolognani --- tests/networkxml2conftest.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index 718a031879..0bc9e128e3 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -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 { \