qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.5] blkdebug: silence warning under qtest
@ 2015-11-30 11:44 Michael S. Tsirkin
  2015-11-30 18:57 ` [Qemu-devel] [Qemu-block] " Max Reitz
  0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2015-11-30 11:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, qemu-block

make check always outputs warnings, this
is not nice.  Disable blkdebug warnings under qtest.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 block/blkdebug.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/block/blkdebug.c b/block/blkdebug.c
index 6860a2b..dee3a0e 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -30,6 +30,7 @@
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qint.h"
 #include "qapi/qmp/qstring.h"
+#include "sysemu/qtest.h"
 
 typedef struct BDRVBlkdebugState {
     int state;
@@ -583,9 +584,13 @@ static void suspend_request(BlockDriverState *bs, BlkdebugRule *rule)
     remove_rule(rule);
     QLIST_INSERT_HEAD(&s->suspended_reqs, &r, next);
 
-    printf("blkdebug: Suspended request '%s'\n", r.tag);
+    if (!qtest_enabled()) {
+        printf("blkdebug: Suspended request '%s'\n", r.tag);
+    }
     qemu_coroutine_yield();
-    printf("blkdebug: Resuming request '%s'\n", r.tag);
+    if (!qtest_enabled()) {
+        printf("blkdebug: Resuming request '%s'\n", r.tag);
+    }
 
     QLIST_REMOVE(&r, next);
     g_free(r.tag);
-- 
MST

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [Qemu-block] [PATCH for-2.5] blkdebug: silence warning under qtest
  2015-11-30 11:44 [Qemu-devel] [PATCH for-2.5] blkdebug: silence warning under qtest Michael S. Tsirkin
@ 2015-11-30 18:57 ` Max Reitz
  0 siblings, 0 replies; 2+ messages in thread
From: Max Reitz @ 2015-11-30 18:57 UTC (permalink / raw)
  To: Michael S. Tsirkin, qemu-devel; +Cc: Kevin Wolf, qemu-block

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

On 30.11.2015 12:44, Michael S. Tsirkin wrote:
> make check always outputs warnings, this
> is not nice.  Disable blkdebug warnings under qtest.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  block/blkdebug.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Thanks, applied to my block tree:

https://github.com/XanClic/qemu/commits/block

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-30 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 11:44 [Qemu-devel] [PATCH for-2.5] blkdebug: silence warning under qtest Michael S. Tsirkin
2015-11-30 18:57 ` [Qemu-devel] [Qemu-block] " Max Reitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).