From: Michael S. Tsirkin Date: Mon, 30 Nov 2015 11:44:44 +0000 (+0200) Subject: blkdebug: silence warning under qtest X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=20873526a329e2145522c29775542dba2900ebe0;p=qemu.git blkdebug: silence warning under qtest make check always outputs warnings, this is not nice. Disable blkdebug warnings under qtest. Signed-off-by: Michael S. Tsirkin Message-id: 1448883874-17933-1-git-send-email-mst@redhat.com Signed-off-by: Max Reitz --- diff --git a/block/blkdebug.c b/block/blkdebug.c index 6860a2ba2f..dee3a0edfc 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);