tests: Remove unnecessary global_qtest references
authorThomas Huth <thuth@redhat.com>
Tue, 20 Aug 2019 19:23:56 +0000 (21:23 +0200)
committerThomas Huth <thuth@redhat.com>
Thu, 5 Sep 2019 11:18:52 +0000 (13:18 +0200)
We are going to remove global_qtest from the main libqtest library
soon, so tests that do not urgently need global_qtest anymore
should be cleaned from the unnecessary references.

Message-Id: <20190904130047.25808-5-thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/ahci-test.c
tests/bios-tables-test.c
tests/ivshmem-test.c
tests/rtas-test.c

index 086811e602122b91e40364d0d10f9bb453bb44d0..c8d42ceea0575db645ce62ec2f0bdb87b6b9921f 100644 (file)
@@ -200,7 +200,6 @@ static void ahci_shutdown(AHCIQState *ahci)
 {
     QOSState *qs = ahci->parent;
 
-    assert(!global_qtest);
     ahci_clean_mem(ahci);
     free_ahci_device(ahci->dev);
     g_free(ahci);
index a356ac34893a7e17cf4994da0186699938393ce0..9b3d8b0d1b8d4e0e2e6c6ffc6861fb0a5b41f475 100644 (file)
@@ -626,7 +626,6 @@ static void test_acpi_one(const char *params, test_data *data)
         test_smbios_structs(data);
     }
 
-    assert(!global_qtest);
     qtest_quit(data->qts);
     g_free(args);
 }
index b76457948bc372eb620cc1ffe09aaabcb54a7df5..be9aa92a6125a966095401e77a6c96034bd76cfb 100644 (file)
@@ -100,7 +100,6 @@ static inline void write_mem(IVState *s, uint64_t off,
 
 static void cleanup_vm(IVState *s)
 {
-    assert(!global_qtest);
     g_free(s->dev);
     qtest_shutdown(s->qs);
 }
@@ -388,7 +387,6 @@ static void test_ivshmem_hotplug(void)
 
     qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1");
 
-    global_qtest = qts;  /* TODO: Get rid of global_qtest here */
     qtest_qmp_device_add(qts, "ivshmem-plain", "iv1",
                          "{'addr': %s, 'memdev': 'mb1'}",
                          stringify(PCI_SLOT_HP));
@@ -397,7 +395,6 @@ static void test_ivshmem_hotplug(void)
     }
 
     qtest_quit(qts);
-    global_qtest = NULL;
 }
 
 static void test_ivshmem_memdev(void)
index ee888676ed298013e263bf7fc110da6532ad0908..167b42db386dcc6212e8ec5f1f0f6ae9a995c517 100644 (file)
@@ -14,7 +14,6 @@ static void test_rtas_get_time_of_day(void)
     time_t t1, t2;
 
     qs = qtest_spapr_boot("-machine pseries");
-    global_qtest = qs->qts;
 
     t1 = time(NULL);
     ret = qrtas_get_time_of_day(qs->qts, &qs->alloc, &tm, &ns);