qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 00/33] Block patches


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PULL 00/33] Block patches
Date: Wed, 28 May 2014 11:52:16 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, May 27, 2014 at 06:15:29PM +0100, Peter Maydell wrote:
> On 23 May 2014 16:41, Stefan Hajnoczi <address@hidden> wrote:
> > The following changes since commit 178ac111bca16c08a79b2609ebdc75197bea976a:
> >
> >   Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into 
> > staging (2014-05-22 19:04:49 +0100)
> >
> > are available in the git repository at:
> >
> >
> >   git://github.com/stefanha/qemu.git tags/block-pull-request
> >
> > for you to fetch changes up to 1c53366b9589b5438336dce86d6ffea35bf80b15:
> >
> >   block/sheepdog: Don't use qerror_report() (2014-05-23 17:39:26 +0200)
> 
> This pullreq seems to introduce extra noise into "make check":
> 
> GTESTER tests/test-qemu-opts
> There is no option group 'unknown'
> 
> Either that should be a test failure or it shouldn't be
> outputting anything.

Here is a fix.  Please review and I'll squash it into a PULL v2.

>From a22e5a88c0d11ca6171d349b44b20dd3a1c78c87 Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <address@hidden>
Date: Wed, 28 May 2014 11:43:13 +0200
Subject: [PATCH] QemuOpt: use qemu_find_opts_err() to avoid output on stderr
 in tests

qemu_find_opts() calls error_report() instead of propagating the Error
object.  It is undesirable to clutter test case output with error
messages from a passing test.

Use qemu_find_opts_err() to avoid the output on stderr.

Cc: Leandro Dorileo <address@hidden>
Cc: Peter Maydell <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
 tests/test-qemu-opts.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/test-qemu-opts.c b/tests/test-qemu-opts.c
index c186040..3653507 100644
--- a/tests/test-qemu-opts.c
+++ b/tests/test-qemu-opts.c
@@ -75,10 +75,13 @@ static void register_opts(void)
 static void test_find_unknown_opts(void)
 {
     QemuOptsList *list;
+    Error *err = NULL;
 
     /* should not return anything, we don't have an "unknown" option */
-    list = qemu_find_opts("unknown");
+    list = qemu_find_opts_err("unknown", &err);
     g_assert(list == NULL);
+    g_assert(err);
+    error_free(err);
 }
 
 static void test_qemu_find_opts(void)
-- 
1.9.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]