diff mbox

qtest: Adding -display none to new tests

Message ID 1384545246-13556-1-git-send-email-kwolf@redhat.com
State New
Headers show

Commit Message

Kevin Wolf Nov. 15, 2013, 7:54 p.m. UTC
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.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/blockdev-test.c     | 2 +-
 tests/qdev-monitor-test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Stefan Hajnoczi Nov. 18, 2013, 3:18 p.m. UTC | #1
On Fri, Nov 15, 2013 at 08:54:06PM +0100, Kevin Wolf wrote:
> 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.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  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.
Kevin Wolf Nov. 18, 2013, 3:31 p.m. UTC | #2
Am 18.11.2013 um 16:18 hat Stefan Hajnoczi geschrieben:
> On Fri, Nov 15, 2013 at 08:54:06PM +0100, Kevin Wolf wrote:
> > 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.
> > 
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> >  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
Andreas Färber Nov. 18, 2013, 4:09 p.m. UTC | #3
Hi,

Am 15.11.2013 20:54, schrieb 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.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/blockdev-test.c     | 2 +-
>  tests/qdev-monitor-test.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c
> index c940e00..fa49e09 100644
> --- a/tests/blockdev-test.c
> +++ b/tests/blockdev-test.c
> @@ -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
diff mbox

Patch

diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c
index c940e00..fa49e09 100644
--- a/tests/blockdev-test.c
+++ b/tests/blockdev-test.c
@@ -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\","
diff --git a/tests/qdev-monitor-test.c b/tests/qdev-monitor-test.c
index 33a8ea4..091ea5b 100644
--- a/tests/qdev-monitor-test.c
+++ b/tests/qdev-monitor-test.c
@@ -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).