tests/qtest/boot-order-test: Make the machine name mandatory in this test
authorThomas Huth <thuth@redhat.com>
Thu, 5 Sep 2024 19:14:29 +0000 (21:14 +0200)
committerThomas Huth <thuth@redhat.com>
Tue, 17 Sep 2024 07:53:17 +0000 (09:53 +0200)
Let's make sure that we always pass a machine name to the test_boot_orders()
function, so we can check whether the machine is available in the binary
and skip the test in case it is not included in the build.

Message-ID: <20240905191434.694440-4-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/boot-order-test.c

index 8f2b6ef05a584174d6006e5c09a1d1cb66a3c486..c67b8cfe16934ea1e9988b090cd7e65d1f868b59 100644 (file)
@@ -31,7 +31,7 @@ static void test_a_boot_order(const char *machine,
     uint64_t actual;
     QTestState *qts;
 
-    if (machine && !qtest_has_machine(machine)) {
+    if (!qtest_has_machine(machine)) {
         g_test_skip("Machine is not available");
         return;
     }
@@ -107,7 +107,7 @@ static const boot_order_test test_cases_pc[] = {
 
 static void test_pc_boot_order(void)
 {
-    test_boot_orders(NULL, read_boot_order_pc, test_cases_pc);
+    test_boot_orders("pc", read_boot_order_pc, test_cases_pc);
 }
 
 static uint64_t read_boot_order_pmac(QTestState *qts)