[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/13] tests/boot-serial: Get rid of global_qtest var
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PULL 06/13] tests/boot-serial: Get rid of global_qtest variable |
Date: |
Mon, 17 Dec 2018 17:21:23 +0100 |
The test does not use any of the functions that require global_qtest,
so we can simply get rid of this global variable here.
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
---
tests/boot-serial-test.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
index 8ec6aed..366fe51 100644
--- a/tests/boot-serial-test.c
+++ b/tests/boot-serial-test.c
@@ -161,6 +161,7 @@ static void test_machine(const void *data)
char codetmp[] = "/tmp/qtest-boot-serial-cXXXXXX";
const char *codeparam = "";
const uint8_t *code = NULL;
+ QTestState *qts;
int ser_fd;
ser_fd = mkstemp(serialtmp);
@@ -189,11 +190,11 @@ static void test_machine(const void *data)
* Make sure that this test uses tcg if available: It is used as a
* fast-enough smoketest for that.
*/
- global_qtest = qtest_initf("%s %s -M %s,accel=tcg:kvm "
- "-chardev file,id=serial0,path=%s "
- "-no-shutdown -serial chardev:serial0 %s",
- codeparam, code ? codetmp : "",
- test->machine, serialtmp, test->extra);
+ qts = qtest_initf("%s %s -M %s,accel=tcg:kvm -no-shutdown "
+ "-chardev file,id=serial0,path=%s "
+ "-serial chardev:serial0 %s",
+ codeparam, code ? codetmp : "", test->machine,
+ serialtmp, test->extra);
if (code) {
unlink(codetmp);
}
@@ -204,7 +205,7 @@ static void test_machine(const void *data)
}
unlink(serialtmp);
- qtest_quit(global_qtest);
+ qtest_quit(qts);
close(ser_fd);
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/13] qtest patches, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 01/13] tests/libqos/pci: Make PCI access functions independent of global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 02/13] ivshmem-test: Drop dependence on global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 04/13] tests/vmgenid: Make test independent of global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 03/13] tests/acpi-utils: Drop dependence on global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 05/13] tests/pvpanic: Make the pvpanic test independent of global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 06/13] tests/boot-serial: Get rid of global_qtest variable,
Thomas Huth <=
- [Qemu-devel] [PULL 08/13] tests/machine-none: Make test independent of global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 09/13] tests/prom-env: Make test independent of global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 07/13] tests/test-filter: Make tests independent of global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 10/13] tests/pxe: Make test independent of global_qtest, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 12/13] tests: acpi: remove not used ACPI_READ_GENERIC_ADDRESS macro, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 11/13] tests: Exit boot-serial-test loop if child dies, Thomas Huth, 2018/12/17
- [Qemu-devel] [PULL 13/13] tests/bios-tables-test: Sanitize test verbose output, Thomas Huth, 2018/12/17
- Re: [Qemu-devel] [PULL 00/13] qtest patches, Peter Maydell, 2018/12/18