From 8eeb98e2ea03639e743fdae82ae69d571d8ef0a3 Mon Sep 17 00:00:00 2001 From: Christian Schoenebeck Date: Fri, 25 Nov 2022 16:58:53 +0100 Subject: [PATCH] tests/qtest/vhost-user-blk-test: don't abort all qtests on missing envar This test requires environment variable QTEST_QEMU_STORAGE_DAEMON_BINARY to be defined for running. If not, it would immediately abort all qtests and prevent other, unrelated tests from running. To fix that, just skip vhost-user-blk-test instead and log a message about missing environment variable. Signed-off-by: Christian Schoenebeck Message-Id: Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/vhost-user-blk-test.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/qtest/vhost-user-blk-test.c b/tests/qtest/vhost-user-blk-test.c index 07a4c2d5001e4..dc37f5af4d152 100644 --- a/tests/qtest/vhost-user-blk-test.c +++ b/tests/qtest/vhost-user-blk-test.c @@ -983,6 +983,12 @@ static void register_vhost_user_blk_test(void) .before = vhost_user_blk_test_setup, }; + if (!getenv("QTEST_QEMU_STORAGE_DAEMON_BINARY")) { + g_test_message("QTEST_QEMU_STORAGE_DAEMON_BINARY not defined, " + "skipping vhost-user-blk-test"); + return; + } + /* * tests for vhost-user-blk and vhost-user-blk-pci * The tests are borrowed from tests/virtio-blk-test.c. But some tests