aboutsummaryrefslogtreecommitdiff
path: root/tests/boot-serial-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/boot-serial-test.c')
-rw-r--r--tests/boot-serial-test.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
index b95c5e7..c935d69 100644
--- a/tests/boot-serial-test.c
+++ b/tests/boot-serial-test.c
@@ -71,7 +71,6 @@ done:
static void test_machine(const void *data)
{
const testdef_t *test = data;
- char *args;
char tmpname[] = "/tmp/qtest-boot-serial-XXXXXX";
int fd;
@@ -82,18 +81,15 @@ 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.
*/
- args = g_strdup_printf("-M %s,accel=tcg:kvm "
- "-chardev file,id=serial0,path=%s "
- "-no-shutdown -serial chardev:serial0 %s",
- test->machine, tmpname, test->extra);
-
- qtest_start(args);
+ global_qtest = qtest_startf("-M %s,accel=tcg:kvm "
+ "-chardev file,id=serial0,path=%s "
+ "-no-shutdown -serial chardev:serial0 %s",
+ test->machine, tmpname, test->extra);
unlink(tmpname);
check_guest_output(test, fd);
qtest_quit(global_qtest);
- g_free(args);
close(fd);
}