From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxAiK-0001wb-1C for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:36:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxAiI-00052I-3t for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:36:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33396) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxAiH-000524-Us for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:36:42 -0400 From: "Dr. David Alan Gilbert (git)" Date: Thu, 20 Oct 2016 11:36:36 +0100 Message-Id: <20161020103636.22228-3-dgilbert@redhat.com> In-Reply-To: <20161020103636.22228-1-dgilbert@redhat.com> References: <20161020103636.22228-1-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] test-vmstate: Silence expected errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, pbonzini@redhat.com, peter.maydell@linaro.org, armbru@redhat.com From: "Dr. David Alan Gilbert" test-vmstate has some expected failure tests (from explicitly truncating an input stream); these trigger errors in the migration code that are now reported; silence these errors. Signed-off-by: Dr. David Alan Gilbert --- tests/test-vmstate.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index d8da26f..79cca87 100644 --- a/tests/test-vmstate.c +++ b/tests/test-vmstate.c @@ -27,8 +27,10 @@ #include "qemu-common.h" #include "migration/migration.h" #include "migration/vmstate.h" +#include "monitor/monitor.h" #include "qemu/coroutine.h" #include "io/channel-file.h" +#include "libqtest.h" static char temp_file[] = "/tmp/vmst.test.XXXXXX"; static int temp_fd; @@ -132,6 +134,9 @@ static int load_vmstate(const VMStateDescription *desc, void (*obj_copy)(void *, void*), int version, uint8_t *wire, size_t size) { + /* Silence errors during the expected failures */ + cur_mon = &stubs_silent_monitor; + /* We test with zero size */ obj_copy(obj_clone, obj); FAILURE(load_vmstate_one(desc, obj, version, wire, 0)); @@ -154,6 +159,9 @@ static int load_vmstate(const VMStateDescription *desc, FAILURE(load_vmstate_one(desc, obj, version, wire + (size/2), size/2)); } + /* Now we shouldn't get any more errors - go back to normal */ + cur_mon = NULL; + obj_copy(obj, obj_clone); return load_vmstate_one(desc, obj, version, wire, size); } -- 2.9.3