[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] tests: use qtest_accel()
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH 2/2] tests: use qtest_accel() |
Date: |
Tue, 15 Aug 2017 13:39:59 -0300 |
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
tests/bios-tables-test.c | 2 +-
tests/boot-serial-test.c | 5 +++--
tests/postcopy-test.c | 10 ++++++----
tests/pxe-test.c | 5 +++--
tests/vmgenid-test.c | 4 ++--
5 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 564da45f65..621bd8d95d 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -627,7 +627,7 @@ static void test_acpi_one(const char *params, test_data
*data)
"-net none -display none %s "
"-drive id=hd0,if=none,file=%s,format=raw "
"-device ide-hd,drive=hd0 ",
- data->machine, "kvm:tcg",
+ data->machine, qtest_accel("kvm:tcg"),
params ? params : "", disk);
qtest_start(args);
diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
index a8ca877168..f986ea51b5 100644
--- a/tests/boot-serial-test.c
+++ b/tests/boot-serial-test.c
@@ -78,10 +78,11 @@ static void test_machine(const void *data)
fd = mkstemp(tmpname);
g_assert(fd != -1);
- args = g_strdup_printf("-M %s,accel=kvm:tcg "
+ args = g_strdup_printf("-M %s,accel=%s "
"-chardev file,id=serial0,path=%s "
"-no-shutdown -serial chardev:serial0 %s",
- test->machine, tmpname, test->extra);
+ test->machine, qtest_accel("kvm:tcg"),
+ tmpname, test->extra);
qtest_start(args);
unlink(tmpname);
diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c
index 8142f2ab90..781b955a59 100644
--- a/tests/postcopy-test.c
+++ b/tests/postcopy-test.c
@@ -367,18 +367,20 @@ static void test_migrate(void)
got_stop = false;
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
+ const char *accel = qtest_accel("kvm:tcg");
+
init_bootfile_x86(bootpath);
- cmd_src = g_strdup_printf("-machine accel=kvm:tcg -m 150M"
+ cmd_src = g_strdup_printf("-machine accel=%s -m 150M"
" -name pcsource,debug-threads=on"
" -serial file:%s/src_serial"
" -drive file=%s,format=raw",
- tmpfs, bootpath);
- cmd_dst = g_strdup_printf("-machine accel=kvm:tcg -m 150M"
+ accel, tmpfs, bootpath);
+ cmd_dst = g_strdup_printf("-machine accel=%s -m 150M"
" -name pcdest,debug-threads=on"
" -serial file:%s/dest_serial"
" -drive file=%s,format=raw"
" -incoming %s",
- tmpfs, bootpath, uri);
+ accel, tmpfs, bootpath, uri);
} else if (strcmp(arch, "ppc64") == 0) {
const char *accel;
diff --git a/tests/pxe-test.c b/tests/pxe-test.c
index cf6e225330..531e0d5506 100644
--- a/tests/pxe-test.c
+++ b/tests/pxe-test.c
@@ -25,9 +25,10 @@ static void test_pxe_one(const char *params, bool ipv6)
{
char *args;
- args = g_strdup_printf("-machine accel=kvm:tcg -nodefaults -boot order=n "
+ args = g_strdup_printf("-machine accel=%s -nodefaults -boot order=n "
"-netdev user,id=" NETNAME ",tftp=./,bootfile=%s,"
- "ipv4=%s,ipv6=%s %s", disk, ipv6 ? "off" : "on",
+ "ipv4=%s,ipv6=%s %s", qtest_accel("kvm:tcg"),
+ disk, ipv6 ? "off" : "on",
ipv6 ? "on" : "off", params);
qtest_start(args);
diff --git a/tests/vmgenid-test.c b/tests/vmgenid-test.c
index 3d5c1c3615..82b52aa44c 100644
--- a/tests/vmgenid-test.c
+++ b/tests/vmgenid-test.c
@@ -132,11 +132,11 @@ static char disk[] = "tests/vmgenid-test-disk-XXXXXX";
static char *guid_cmd_strdup(const char *guid)
{
- return g_strdup_printf("-machine accel=kvm:tcg "
+ return g_strdup_printf("-machine accel=%s "
"-device vmgenid,id=testvgid,guid=%s "
"-drive id=hd0,if=none,file=%s,format=raw "
"-device ide-hd,drive=hd0 ",
- guid, disk);
+ qtest_accel("kvm:tcg"), guid, disk);
}
--
2.14.1
[Qemu-devel] [PATCH 2/2] tests: use qtest_accel(),
Philippe Mathieu-Daudé <=