* [PATCH] failover: Silence warning messages during qtest
@ 2021-12-20 14:53 Laurent Vivier
2021-12-20 16:40 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Laurent Vivier @ 2021-12-20 14:53 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Vivier, Thomas Huth, Juan Quintela, Jason Wang,
Michael S. Tsirkin, Dr. David Alan Gilbert
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>
---
hw/net/virtio-net.c | 3 ++-
migration/migration.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index f2014d5ea0b3..c64a6b9d1745 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
@@ -925,7 +926,7 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features)
qapi_event_send_failover_negotiated(n->netclient_name);
qatomic_set(&n->failover_primary_hidden, false);
failover_add_primary(n, &err);
- if (err) {
+ if (err && !qtest_enabled()) {
warn_report_err(err);
}
}
diff --git a/migration/migration.c b/migration/migration.c
index 3de11ae921e0..065216561063 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.33.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] failover: Silence warning messages during qtest
2021-12-20 14:53 [PATCH] failover: Silence warning messages during qtest Laurent Vivier
@ 2021-12-20 16:40 ` Philippe Mathieu-Daudé
2021-12-21 5:45 ` Jason Wang
2021-12-21 12:30 ` Thomas Huth
2 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-12-20 16:40 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel
Cc: Thomas Huth, Michael S. Tsirkin, Jason Wang,
Dr. David Alan Gilbert, Juan Quintela
On 12/20/21 15:53, Laurent Vivier wrote:
> 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
Typo "warnings".
> sequence.
>
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> hw/net/virtio-net.c | 3 ++-
> migration/migration.c | 4 +++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] failover: Silence warning messages during qtest
2021-12-20 14:53 [PATCH] failover: Silence warning messages during qtest Laurent Vivier
2021-12-20 16:40 ` Philippe Mathieu-Daudé
@ 2021-12-21 5:45 ` Jason Wang
2021-12-21 12:30 ` Thomas Huth
2 siblings, 0 replies; 5+ messages in thread
From: Jason Wang @ 2021-12-21 5:45 UTC (permalink / raw)
To: Laurent Vivier
Cc: Thomas Huth, Juan Quintela, qemu-devel, Dr. David Alan Gilbert,
Michael S. Tsirkin
On Mon, Dec 20, 2021 at 10:53 PM Laurent Vivier <lvivier@redhat.com> wrote:
>
> 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>
> ---
Acked-by: Jason Wang <jasowang@redhat.com>
> hw/net/virtio-net.c | 3 ++-
> migration/migration.c | 4 +++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index f2014d5ea0b3..c64a6b9d1745 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
>
> @@ -925,7 +926,7 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features)
> qapi_event_send_failover_negotiated(n->netclient_name);
> qatomic_set(&n->failover_primary_hidden, false);
> failover_add_primary(n, &err);
> - if (err) {
> + if (err && !qtest_enabled()) {
> warn_report_err(err);
> }
> }
> diff --git a/migration/migration.c b/migration/migration.c
> index 3de11ae921e0..065216561063 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.33.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] failover: Silence warning messages during qtest
2021-12-20 14:53 [PATCH] failover: Silence warning messages during qtest Laurent Vivier
2021-12-20 16:40 ` Philippe Mathieu-Daudé
2021-12-21 5:45 ` Jason Wang
@ 2021-12-21 12:30 ` Thomas Huth
2021-12-21 13:26 ` Philippe Mathieu-Daudé
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2021-12-21 12:30 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel
Cc: Jason Wang, Juan Quintela, Dr. David Alan Gilbert, Michael S. Tsirkin
On 20/12/2021 15.53, Laurent Vivier wrote:
> 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>
> ---
> hw/net/virtio-net.c | 3 ++-
> migration/migration.c | 4 +++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index f2014d5ea0b3..c64a6b9d1745 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
>
> @@ -925,7 +926,7 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features)
> qapi_event_send_failover_negotiated(n->netclient_name);
> qatomic_set(&n->failover_primary_hidden, false);
> failover_add_primary(n, &err);
> - if (err) {
> + if (err && !qtest_enabled()) {
> warn_report_err(err);
> }
This trips the sanitizer build now:
https://gitlab.com/thuth/qemu/-/jobs/1907374419
I think you have to error_free(err) in case qtest_enabled() ?
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] failover: Silence warning messages during qtest
2021-12-21 12:30 ` Thomas Huth
@ 2021-12-21 13:26 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-12-21 13:26 UTC (permalink / raw)
To: Thomas Huth, Laurent Vivier, qemu-devel
Cc: Jason Wang, Michael S. Tsirkin, Dr. David Alan Gilbert, Juan Quintela
On 12/21/21 13:30, Thomas Huth wrote:
> On 20/12/2021 15.53, Laurent Vivier wrote:
>> 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>
>> ---
>> hw/net/virtio-net.c | 3 ++-
>> migration/migration.c | 4 +++-
>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
>> index f2014d5ea0b3..c64a6b9d1745 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
>> @@ -925,7 +926,7 @@ static void virtio_net_set_features(VirtIODevice
>> *vdev, uint64_t features)
>> qapi_event_send_failover_negotiated(n->netclient_name);
>> qatomic_set(&n->failover_primary_hidden, false);
>> failover_add_primary(n, &err);
>> - if (err) {
>> + if (err && !qtest_enabled()) {
>> warn_report_err(err);
>> }
>
> This trips the sanitizer build now:
>
> https://gitlab.com/thuth/qemu/-/jobs/1907374419
>
> I think you have to error_free(err) in case qtest_enabled() ?
Indeed. In that case it might be better to add a
warn_report_err_except_qtest() helper...
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-21 13:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 14:53 [PATCH] failover: Silence warning messages during qtest Laurent Vivier
2021-12-20 16:40 ` Philippe Mathieu-Daudé
2021-12-21 5:45 ` Jason Wang
2021-12-21 12:30 ` Thomas Huth
2021-12-21 13:26 ` Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.