From: Michal Privoznik Date: Mon, 17 May 2021 19:34:55 +0000 (+0200) Subject: qemusecuritytest: Honour EXIT_AM_SKIP X-Git-Tag: v7.4.0-rc1~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7b0026e46506c3824a928db741ac11e9e51f828;p=thirdparty%2Flibvirt.git qemusecuritytest: Honour EXIT_AM_SKIP There is a case where qemusecuritytest is skipped - on MacOS and MinGW. In such case, EXIT_AM_SKIP should be returned. However, my recent patch of 5d99b157bc completely missed that and made the test return EXIT_FAILURE even though the test exited early without performing any test case. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/tests/qemusecuritytest.c b/tests/qemusecuritytest.c index f7186700c4..a7e87fdf8f 100644 --- a/tests/qemusecuritytest.c +++ b/tests/qemusecuritytest.c @@ -143,15 +143,13 @@ mymain(void) #endif int ret = 0; + if (!virSecurityXATTRNamespaceDefined()) + return EXIT_AM_SKIP; + if (virInitialize() < 0 || qemuTestDriverInit(&driver) < 0) return -1; - if (!virSecurityXATTRNamespaceDefined()) { - ret = EXIT_AM_SKIP; - goto cleanup; - } - /* Now fix the secdriver */ virObjectUnref(driver.securityManager);