]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/pxe: Make test independent of global_qtest
authorThomas Huth <thuth@redhat.com>
Mon, 19 Nov 2018 15:40:44 +0000 (16:40 +0100)
committerThomas Huth <thuth@redhat.com>
Mon, 17 Dec 2018 14:36:40 +0000 (15:36 +0100)
global_qtest is not really required here, since boot_sector_test()
is already independent from that global variable.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/pxe-test.c

index 6e3679672c49075ecf790dfa1d72e4f057d97221..73ac1d1c61442c0e8defc43f19c8534c63d2e738 100644 (file)
@@ -61,6 +61,7 @@ static testdef_t s390x_tests[] = {
 
 static void test_pxe_one(const testdef_t *test, bool ipv6)
 {
+    QTestState *qts;
     char *args;
 
     args = g_strdup_printf(
@@ -70,9 +71,9 @@ static void test_pxe_one(const testdef_t *test, bool ipv6)
         test->machine, disk, ipv6 ? "off" : "on", ipv6 ? "on" : "off",
         test->model);
 
-    qtest_start(args);
-    boot_sector_test(global_qtest);
-    qtest_quit(global_qtest);
+    qts = qtest_init(args);
+    boot_sector_test(qts);
+    qtest_quit(qts);
     g_free(args);
 }