From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Mt5-0005JR-TV for qemu-devel@nongnu.org; Mon, 30 Nov 2015 06:44:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3Mt5-0000Jg-6Z for qemu-devel@nongnu.org; Mon, 30 Nov 2015 06:44:55 -0500 Date: Mon, 30 Nov 2015 13:44:44 +0200 From: "Michael S. Tsirkin" Message-ID: <1448883874-17933-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH for-2.5] blkdebug: silence warning under qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org make check always outputs warnings, this is not nice. Disable blkdebug warnings under qtest. Signed-off-by: Michael S. Tsirkin --- 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