From 95420c4c7268796fc3b95e3609194c7fe2d2d8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Tue, 21 Nov 2017 18:48:56 +0100 Subject: [PATCH] Avoid silent pass in case no cpuflags were detected for testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case no cpuflags were detected to be tested (after blacklisting) this test silently passes not testing anything at all. Let's use "test.cancel" to notify the user that nothing was actually executed. Signed-off-by: Lukáš Doktor --- qemu/tests/cpuflags.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu/tests/cpuflags.py b/qemu/tests/cpuflags.py index 39c88139..782e5f0f 100644 --- a/qemu/tests/cpuflags.py +++ b/qemu/tests/cpuflags.py @@ -1140,6 +1140,8 @@ def run(test, params, env): else: cpu_models = (set(get_cpu_models_supported_by_host()) - set(cpu_model_black_list)) + if not cpu_models: + test.cancel("No cpu_models detected, nothing to test.") logging.info("Start test with cpu models %s" % (str(cpu_models))) failed = [] for cpumodel in cpu_models: -- GitLab