Message ID | 20140528095216.GA24754@stefanha-thinkpad.redhat.com |
---|---|
State | New |
Headers | show |
On 28 May 2014 10:52, Stefan Hajnoczi <stefanha@redhat.com> wrote: > On Tue, May 27, 2014 at 06:15:29PM +0100, Peter Maydell wrote: >> On 23 May 2014 16:41, Stefan Hajnoczi <stefanha@redhat.com> 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 <stefanha@redhat.com> > 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 <l@dorileo.org> > Cc: Peter Maydell <peter.maydell@linaro.org> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Thanks for fixing this -- it's a small thing but I'm trying to keep the 'make check' output from getting cluttered with random output waffle. -- PMM
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)