]> git.proxmox.com Git - mirror_qemu.git/commitdiff
blkdebug: silence warning under qtest
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 30 Nov 2015 11:44:44 +0000 (13:44 +0200)
committerMax Reitz <mreitz@redhat.com>
Wed, 2 Dec 2015 15:28:10 +0000 (16:28 +0100)
make check always outputs warnings, this
is not nice.  Disable blkdebug warnings under qtest.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 1448883874-17933-1-git-send-email-mst@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/blkdebug.c

index 6860a2ba2fc005b34e048ccc5cf6b8ac87587045..dee3a0edfc4a586e6bb1e724f634bad9239fa18e 100644 (file)
@@ -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);