From: Eric Blake <eblake@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: qemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,
Fabiano Rosas <farosas@suse.de>,
Juraj Marcin <jmarcin@redhat.com>
Subject: Re: [PATCH v2 3/5] tests/qtest/migration: check the destination run state in postcopy tests
Date: Wed, 11 Nov 2026 11:32:04 -0600 [thread overview]
Message-ID: <avSlft9YtBrdT8H_@redhat.com> (raw)
In-Reply-To: <20261110183257.2930908-4-den@openvz.org>
On Tue, Nov 10, 2026 at 07:32:55PM +0100, Denis V. Lunev wrote:
> From: Denis V. Lunev <den@openvz.org>
>
> The destination must not report postcopy-active or completed while it
> is still in RUN_STATE_INMIGRATE. The destination autostarts in these
> tests, so the run state change emits RESUME and the order is visible in
> the event stream: record a MIGRATION postcopy-active or completed event
> seen before RESUME and fail the postcopy tests on it once the
> destination has completed.
>
> migrate_postcopy_start() waited for the destination's RESUME with
> qtest_qmp_eventwait(), which reads events past the event callback and
> drops the ones it does not want. Poll query-status instead, so every
> destination event reaches the callback.
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Cc: Peter Xu <peterx@redhat.com>
> Cc: Fabiano Rosas <farosas@suse.de>
> Cc: Juraj Marcin <jmarcin@redhat.com>
> ---
> tests/qtest/migration/framework.c | 6 ++++--
> tests/qtest/migration/migration-qmp.c | 10 ++++++++--
> tests/qtest/migration/migration-qmp.h | 3 ++-
> tests/qtest/migration/migration-util.c | 8 ++++++++
> tests/qtest/migration/migration-util.h | 2 ++
> 5 files changed, 24 insertions(+), 5 deletions(-)
Took me a while to figure out that I needed a temporary:
$ sudo sysctl -w vm.unprivileged_userfaultfd=1
to get the test to pass/fail rather than skip, but with that done, I
can confirm that the test was sufficient to show failure without 2/5,
and pass when the series is applied in order. I'd be remiss if I did
not mention how handy it was to have AI help me dig up the specific
configuration and tests I needed to run for double-checking your patch
(thankfully, much different than the ethical worries about using AI to
write a patch in the first place).
Tested-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
next prev parent reply other threads:[~2026-11-11 17:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 18:32 [PATCH v2 0/5] migration/postcopy: report destination states only after the run state change Denis V. Lunev
2026-11-10 18:32 ` [PATCH v2 1/5] migration/postcopy: report COMPLETED only after the run BH has run Denis V. Lunev
2026-11-11 16:20 ` Eric Blake
2026-11-10 18:32 ` [PATCH v2 2/5] migration/postcopy: set destination postcopy-active in the run BH Denis V. Lunev
2026-11-11 16:34 ` Eric Blake
2026-11-10 18:32 ` [PATCH v2 3/5] tests/qtest/migration: check the destination run state in postcopy tests Denis V. Lunev
2026-11-11 17:32 ` Eric Blake [this message]
2026-11-10 18:32 ` [PATCH v2 4/5] migration/postcopy: answer the package-loaded ping from the run BH Denis V. Lunev
2026-11-10 18:32 ` [PATCH v2 5/5] iotests/migrate-bitmaps-postcopy-test: cover postcopy with a return path Denis V. Lunev
2026-11-11 20:03 ` Eric Blake
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=avSlft9YtBrdT8H_@redhat.com \
--to=eblake@redhat.com \
--cc=den@openvz.org \
--cc=farosas@suse.de \
--cc=jmarcin@redhat.com \
--cc=peterx@redhat.com \
--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.