From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, pbonzini@redhat.com,
peter.maydell@linaro.org, armbru@redhat.com
Subject: [Qemu-devel] [PATCH 2/2] test-vmstate: Silence expected errors
Date: Thu, 20 Oct 2016 11:36:36 +0100 [thread overview]
Message-ID: <20161020103636.22228-3-dgilbert@redhat.com> (raw)
In-Reply-To: <20161020103636.22228-1-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
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 <dgilbert@redhat.com>
---
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
next prev parent reply other threads:[~2016-10-20 10:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 10:36 [Qemu-devel] [PATCH 0/2] Silence test-vmstate errors Dr. David Alan Gilbert (git)
2016-10-20 10:36 ` [Qemu-devel] [PATCH 1/2] tests/stubs: Add a dummy, silent monitor Dr. David Alan Gilbert (git)
2016-10-20 14:24 ` Eric Blake
2016-10-20 10:36 ` Dr. David Alan Gilbert (git) [this message]
2016-10-24 12:55 ` [Qemu-devel] [PATCH 2/2] test-vmstate: Silence expected errors Markus Armbruster
2016-10-24 13:00 ` Paolo Bonzini
2016-10-24 12:59 ` [Qemu-devel] [PATCH 0/2] Silence test-vmstate errors Markus Armbruster
2016-10-24 13:07 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161020103636.22228-3-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).