qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>,
	qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH] failover: Silence warning messages during qtest
Date: Tue, 21 Dec 2021 14:26:49 +0100	[thread overview]
Message-ID: <42a61ff0-1622-ddf7-942d-c9428e7c1b5c@redhat.com> (raw)
In-Reply-To: <bac44c19-7e63-919e-6491-9c50f1933abc@redhat.com>

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...



      reply	other threads:[~2021-12-21 13:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=42a61ff0-1622-ddf7-942d-c9428e7c1b5c@redhat.com \
    --to=philmd@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.com \
    /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).