From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Laurent Vivier" <lvivier@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: [PULL 1/9] failover: Silence warning messages during qtest
Date: Wed, 22 Dec 2021 12:32:51 +0100 [thread overview]
Message-ID: <20211222113259.823203-2-thuth@redhat.com> (raw)
In-Reply-To: <20211222113259.823203-1-thuth@redhat.com>
From: Laurent Vivier <lvivier@redhat.com>
virtio-net-failover test tries several device combinations that produces
some expected warnings.
These warning can be confusing, so we disable them during the qtest
sequence.
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20211220145314.390697-1-lvivier@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
[thuth: Fix memory leak by using error_free()]
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/net/virtio-net.c | 7 ++++++-
migration/migration.c | 4 +++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index f2014d5ea0..cf8ab0f8af 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -44,6 +44,7 @@
#include "hw/pci/pci.h"
#include "net_rx_pkt.h"
#include "hw/virtio/vhost.h"
+#include "sysemu/qtest.h"
#define VIRTIO_NET_VM_VERSION 11
@@ -926,7 +927,11 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features)
qatomic_set(&n->failover_primary_hidden, false);
failover_add_primary(n, &err);
if (err) {
- warn_report_err(err);
+ if (!qtest_enabled()) {
+ warn_report_err(err);
+ } else {
+ error_free(err);
+ }
}
}
}
diff --git a/migration/migration.c b/migration/migration.c
index 3de11ae921..0652165610 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -60,6 +60,7 @@
#include "qemu/yank.h"
#include "sysemu/cpus.h"
#include "yank_functions.h"
+#include "sysemu/qtest.h"
#define MAX_THROTTLE (128 << 20) /* Migration transfer speed throttling */
@@ -3766,7 +3767,8 @@ static void qemu_savevm_wait_unplug(MigrationState *s, int old_state,
while (timeout-- && qemu_savevm_state_guest_unplug_pending()) {
qemu_sem_timedwait(&s->wait_unplug_sem, 250);
}
- if (qemu_savevm_state_guest_unplug_pending()) {
+ if (qemu_savevm_state_guest_unplug_pending() &&
+ !qtest_enabled()) {
warn_report("migration: partially unplugged device on "
"failure");
}
--
2.27.0
next prev parent reply other threads:[~2021-12-22 11:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 11:32 [PULL 0/9] qtest fixes and improvements Thomas Huth
2021-12-22 11:32 ` Thomas Huth [this message]
2021-12-22 11:32 ` [PULL 2/9] tests/qtest/boot-serial-test: Silence the warning about deprecated sga device Thomas Huth
2021-12-22 11:32 ` [PULL 3/9] tests/qtest: Make the filter tests independent from a specific NIC Thomas Huth
2021-12-22 11:32 ` [PULL 4/9] MAINTAINERS: Update COLO Proxy section Thomas Huth
2021-12-22 11:32 ` [PULL 5/9] tests/qtest: Add a function that checks whether a device is available Thomas Huth
2021-12-22 11:32 ` [PULL 6/9] tests/qtest: Improve endianness-test to work with missing machines and devices Thomas Huth
2021-12-22 11:32 ` [PULL 7/9] tests/qtest/cdrom-test: Check whether devices are available before using them Thomas Huth
2021-12-22 11:32 ` [PULL 8/9] tests/qtest/boot-order-test: Check whether machines are available Thomas Huth
2021-12-22 11:32 ` [PULL 9/9] tests/qtest/virtio-net-failover: Use g_file_open_tmp() to create temporary file Thomas Huth
2021-12-22 18:00 ` [PULL 0/9] qtest fixes and improvements Richard Henderson
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=20211222113259.823203-2-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=jasowang@redhat.com \
--cc=lvivier@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).