Skip to contentSkip to conversation

qtest: Adding -display none to new tests

PATCH In review Kevin Wolf 3 participants 4 messages Nov 15, 2013 – Nov 18, 2013

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 qtest: Adding -display none to new tests

Without it, you either get a window for a short time, or worse, test failures when 'make check' isn't run in an X session.

---
 tests/blockdev-test.c     | 2 +-
 tests/qdev-monitor-test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/blockdev-test.c +1 -1
index c940e00..fa49e09 100644
@@ -20,7 +20,7 @@ static void test_drive_add_empty(void)
     const char *response_return;
 
     /* Start with an empty drive */
-    qtest_start("-drive if=none,id=drive0");
+    qtest_start("-display none -drive if=none,id=drive0");
 
     /* Delete the drive */
     response = qmp("{\"execute\": \"human-monitor-command\","
tests/qdev-monitor-test.c +1 -1
index 33a8ea4..091ea5b 100644
@@ -20,7 +20,7 @@ static void test_device_add(void)
     QDict *response;
     QDict *error;
 
-    qtest_start("-drive if=none,id=drive0");
+    qtest_start("-display none -drive if=none,id=drive0");
 
     /* Make device_add fail.  If this leaks the virtio-blk-pci device then a
      * reference to drive0 will also be held (via qdev properties).
Signature · 1 line
1.8.1.4
#1 lore raw
Quoted 8 lines · Kevin Wolf

Without it, you either get a window for a short time, or worse, test failures when 'make check' isn't run in an X session.

---
 tests/blockdev-test.c     | 2 +-
 tests/qdev-monitor-test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Thanks, I merged earlier "[PATCH for-1.7] tests: add missing -display none to qtests" patch.

author
#2 lore raw

Am 18.11.2013 um 16:18 hat Stefan Hajnoczi geschrieben:

Quoted 12 lines · Kevin Wolf
Quoted 8 lines

Without it, you either get a window for a short time, or worse, test failures when 'make check' isn't run in an X session.

---
 tests/blockdev-test.c     | 2 +-
 tests/qdev-monitor-test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Thanks, I merged earlier "[PATCH for-1.7] tests: add missing -display none to qtests" patch.

It didn't arrive in master yet. Are you sure it was queued in the block tree?

Kevin

#3 lore raw
In reply to Kevin Wolf

Hi,

Am 15.11.2013 20:54, schrieb Kevin Wolf:

Quoted 14 lines

Without it, you either get a window for a short time, or worse, test failures when 'make check' isn't run in an X session.

---
 tests/blockdev-test.c     | 2 +-
 tests/qdev-monitor-test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/blockdev-test.c +0 -0
index c940e00..fa49e09 100644

tests/blockdev-test.c static void test_drive_add_empty(void) · line 23

Quoted 5 lines
tests/blockdev-test.c +1 -1
@@ -20,7 +20,7 @@ static void test_drive_add_empty(void)
     const char *response_return;
 
     /* Start with an empty drive */
-    qtest_start("-drive if=none,id=drive0");
+    qtest_start("-display none -drive if=none,id=drive0");

[snip]

I've been wondering: Can't we just make qtest_start prepend -display none always, so that we don't have to remember to repeatedly add it everywhere?

Cheers,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg