Skip to contentSkip to conversation

qtest: Fix the bug about disable vnc causes "make check" fail

PATCH Applied Kewei Yu 3 participants 3 messages Jan 6, 2014 – Jan 7, 2014

lore
Share & tools
lore

Kewei Yu

author
#0 lore raw

PATCH v4 1/1 qtest: Fix the bug about disable vnc causes "make check" fail

When we disable vnc from "./configure", QEMU can't use the vnc option. So qtest can't use the "vnc -none ", otherwise "make check" fails.
If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to drop it.

---
v2: Consolidate VNC macro's #ifdef'ery to one central point (tests/libqtest.c).
v3: Fix the spelling and terminology error: "s/disabling/disable; s/the\ qemu/QEMU; s/hangs/fails;"
v4: If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to drop it.

---
 tests/fdc-test.c |    5 +----
 tests/ide-test.c |    3 ---
 2 files changed, 1 insertions(+), 7 deletions(-)
tests/fdc-test.c +1 -4
index 38b5b17..37096dc 100644
@@ -518,7 +518,6 @@ static void fuzz_registers(void)
 int main(int argc, char **argv)
 {
     const char *arch = qtest_get_arch();
-    char *cmdline;
     int fd;
     int ret;
 
@@ -538,9 +537,7 @@ int main(int argc, char **argv)
     /* Run the tests */
     g_test_init(&argc, &argv, NULL);
 
-    cmdline = g_strdup_printf("-vnc none ");
-
-    qtest_start(cmdline);
+    qtest_start(NULL);
     qtest_irq_intercept_in(global_qtest, "ioapic");
     qtest_add_func("/fdc/cmos", test_cmos);
     qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start);
tests/ide-test.c +0 -3
index d5cec5a..4a0d97f 100644
@@ -380,7 +380,6 @@ static void test_bmdma_no_busmaster(void)
 static void test_bmdma_setup(void)
 {
     ide_test_start(
-        "-vnc none "
         "-drive file=%s,if=ide,serial=%s,cache=writeback "
         "-global ide-hd.ver=%s",
         tmp_path, "testdisk", "version");
@@ -410,7 +409,6 @@ static void test_identify(void)
     int ret;
 
     ide_test_start(
-        "-vnc none "
         "-drive file=%s,if=ide,serial=%s,cache=writeback "
         "-global ide-hd.ver=%s",
         tmp_path, "testdisk", "version");
@@ -455,7 +453,6 @@ static void test_flush(void)
     uint8_t data;
 
     ide_test_start(
-        "-vnc none "
         "-drive file=blkdebug::%s,if=ide,cache=writeback",
         tmp_path);
 
Signature · 1 line
1.7.1
Reviewed-by on v4 1/1
#1 lore raw

Il 06/01/2014 07:05, Kewei Yu ha scritto:

Quoted 59 lines

When we disable vnc from "./configure", QEMU can't use the vnc option. So qtest can't use the "vnc -none ", otherwise "make check" fails.
If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to drop it.

---
v2: Consolidate VNC macro's #ifdef'ery to one central point (tests/libqtest.c).
v3: Fix the spelling and terminology error: "s/disabling/disable; s/the\ qemu/QEMU; s/hangs/fails;"
v4: If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to drop it.

---
 tests/fdc-test.c |    5 +----
 tests/ide-test.c |    3 ---
 2 files changed, 1 insertions(+), 7 deletions(-)
tests/fdc-test.c +1 -4
index 38b5b17..37096dc 100644
@@ -518,7 +518,6 @@ static void fuzz_registers(void)
 int main(int argc, char **argv)
 {
     const char *arch = qtest_get_arch();
-    char *cmdline;
     int fd;
     int ret;
 
@@ -538,9 +537,7 @@ int main(int argc, char **argv)
     /* Run the tests */
     g_test_init(&argc, &argv, NULL);
 
-    cmdline = g_strdup_printf("-vnc none ");
-
-    qtest_start(cmdline);
+    qtest_start(NULL);
     qtest_irq_intercept_in(global_qtest, "ioapic");
     qtest_add_func("/fdc/cmos", test_cmos);
     qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start);
tests/ide-test.c +0 -2
index d5cec5a..4a0d97f 100644
@@ -380,7 +380,6 @@ static void test_bmdma_no_busmaster(void)
 static void test_bmdma_setup(void)
 {
     ide_test_start(
-        "-vnc none "
         "-drive file=%s,if=ide,serial=%s,cache=writeback "
         "-global ide-hd.ver=%s",
         tmp_path, "testdisk", "version");
@@ -410,7 +409,6 @@ static void test_identify(void)
     int ret;
 
     ide_test_start(
-        "-vnc none "
         "-drive file=%s,if=ide,serial=%s,cache=writeback "
         "-global ide-hd.ver=%s",
         tmp_path, "testdisk", "version");

tests/ide-test.c static void test_flush(void) · line 458

Quoted 7 lines
tests/ide-test.c +0 -1
@@ -455,7 +453,6 @@ static void test_flush(void)
     uint8_t data;
 
     ide_test_start(
-        "-vnc none "
         "-drive file=blkdebug::%s,if=ide,cache=writeback",
         tmp_path);
 
Applied
#2 lore raw

Am 07.01.2014 um 15:41 hat Paolo Bonzini geschrieben:

Quoted 5 lines

Il 06/01/2014 07:05, Kewei Yu ha scritto:

Quoted 4 lines

When we disable vnc from "./configure", QEMU can't use the vnc option. So qtest can't use the "vnc -none ", otherwise "make check" fails.
If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to drop it.

Quoted 7 lines
Quoted 5 lines

---
v2: Consolidate VNC macro's #ifdef'ery to one central point (tests/libqtest.c).
v3: Fix the spelling and terminology error: "s/disabling/disable; s/the\ qemu/QEMU; s/hangs/fails;"
v4: If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to drop it.

Thanks, applied to the block branch.

Kevin