All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 5/8] tests/qtest/migration: Force exit-on-error=false when appropriate
Date: Wed, 11 Mar 2026 11:40:46 -0400	[thread overview]
Message-ID: <abGM_oxlF_WsrgeS@x1.local> (raw)
In-Reply-To: <87o6kvz8sp.fsf@suse.de>

On Tue, Mar 10, 2026 at 06:14:30PM -0300, Fabiano Rosas wrote:
> Peter Xu <peterx@redhat.com> writes:
> 
> > On Tue, Mar 10, 2026 at 10:55:37AM -0300, Fabiano Rosas wrote:
> >> Some tests can cause QEMU to exit(1) too early while the incoming
> >> coroutine has not yielded for a first time yet. This trips ASAN
> >> because resources related to dispatching the incoming process will
> >> still be allocated in the io/channel.c layer without a
> >> straight-forward way for the migration code to clean them up.
> >> 
> >> Since this is an issue only affecting testing and leak detection,
> >> let's make sure tests only use MIG_TEST_FAIL_DEST_QUIT_ERR when
> >> strictly necessary.
> >> 
> >> To make this process easier, force exit-on-error=false for precopy
> >> whenever the expected test result is MIG_TEST_FAIL. The distinction
> >> between the two return codes is exactly that, the latter should never
> >> cause exit(1).
> >> 
> >> The affected tests for now are the TLS tests "no_hostname" and
> >> "mismatch_host".
> >> 
> >> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> >> ---
> >>  tests/qtest/migration/framework.c | 5 ++++-
> >>  tests/qtest/migration/tls-tests.c | 6 ++++--
> >>  2 files changed, 8 insertions(+), 3 deletions(-)
> >> 
> >> diff --git a/tests/qtest/migration/framework.c b/tests/qtest/migration/framework.c
> >> index 4cc63bba7b..cfb8409d33 100644
> >> --- a/tests/qtest/migration/framework.c
> >> +++ b/tests/qtest/migration/framework.c
> >> @@ -854,7 +854,10 @@ int test_precopy_common(MigrateCommon *args)
> >>              in_channels = qobject_from_json(args->connect_channels,
> >>                                              &error_abort);
> >>          }
> >> -        migrate_incoming_qmp(to, args->listen_uri, in_channels, "{}");
> >> +
> >> +        migrate_incoming_qmp(to, args->listen_uri, in_channels,
> >> +                             args->result == MIG_TEST_FAIL ?
> >> +                             "{ 'exit-on-error': false }" : "{}");
> >
> > Can we set exit-on-error unconditionally?
> >
> 
> Yeah, what about I just remove MIG_TEST_FAIL_DEST_QUIT_ERR entirely?
> Aside from the ones mentioned in this series, there's only one other TLS
> test using it. There are two tests setting qtest_set_expected_status(to,
> EXIT_FAILURE); after migrate_cancel, but we can just wait for FAILED and
> then qtest_quit(to);

Ah yes we have one left.. Sounds good, can also be done on top if you will
queue this.

-- 
Peter Xu



  parent reply	other threads:[~2026-03-11 15:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 13:55 [PATCH 1/8] tests/qtest/migration: Fix leak of migration tests data Fabiano Rosas
2026-03-10 13:55 ` [PATCH 2/8] tests/qtest/migration: Change validate_uuid test to not trigger exit(1) Fabiano Rosas
2026-03-10 19:59   ` Peter Xu
2026-03-11 10:34   ` Prasad Pandit
2026-03-10 13:55 ` [PATCH 3/8] tests/qtest/migration: Fix misuse of listen_uri Fabiano Rosas
2026-03-10 15:48   ` Lukas Straub
2026-03-10 13:55 ` [PATCH 4/8] tests/qtest/migration: Stop invoking migrate_incoming from hooks Fabiano Rosas
2026-03-10 15:47   ` Lukas Straub
2026-03-10 13:55 ` [PATCH 5/8] tests/qtest/migration: Force exit-on-error=false when appropriate Fabiano Rosas
2026-03-10 20:46   ` Peter Xu
2026-03-10 21:14     ` Fabiano Rosas
2026-03-11 10:36       ` Prasad Pandit
2026-03-11 15:40       ` Peter Xu [this message]
2026-03-10 13:55 ` [PATCH 6/8] io: Fix TLS bye task leak Fabiano Rosas
2026-03-10 14:29   ` Daniel P. Berrangé
2026-03-10 13:55 ` [PATCH 7/8] tests/qtest/migration: Fix leak in CPR exec test Fabiano Rosas
2026-03-10 20:46   ` Peter Xu
2026-03-11  9:56   ` Prasad Pandit
2026-03-10 13:55 ` [PATCH 8/8] migration/multifd: Fix leaks of TLS error objects Fabiano Rosas
2026-03-10 20:49   ` Peter Xu
2026-03-11  9:32   ` Prasad Pandit
2026-03-10 19:47 ` [PATCH 1/8] tests/qtest/migration: Fix leak of migration tests data Peter Xu
2026-03-11 11:56 ` Prasad Pandit
2026-03-11 12:57   ` Fabiano Rosas

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=abGM_oxlF_WsrgeS@x1.local \
    --to=peterx@redhat.com \
    --cc=farosas@suse.de \
    --cc=lvivier@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 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.