From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: peterx@redhat.com, "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Juan Quintela" <quintela@redhat.com>
Subject: Re: [PATCH v4 3/5] tests/migration-test: Add a test for postcopy hangs during RECOVER
Date: Tue, 31 Oct 2023 19:01:02 -0300 [thread overview]
Message-ID: <87o7gecuzl.fsf@suse.de> (raw)
In-Reply-To: <20231017202633.296756-4-peterx@redhat.com>
Peter Xu <peterx@redhat.com> writes:
> From: Fabiano Rosas <farosas@suse.de>
>
> To do so, create two paired sockets, but make them not providing real data.
> Feed those fake sockets to src/dst QEMUs for recovery to let them go into
> RECOVER stage without going out. Test that we can always kick it out and
> recover again with the right ports.
>
> This patch is based on Fabiano's version here:
>
> https://lore.kernel.org/r/877cowmdu0.fsf@suse.de
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> [peterx: write commit message, remove case 1, fix bugs, and more]
> Signed-off-by: Peter Xu <peterx@redhat.com>
This patch breaks the windows build. We need this:
-->8--
From 96fee99f2a3c8e11951100d94159eba02dd98540 Mon Sep 17 00:00:00 2001
From: Fabiano Rosas <farosas@suse.de>
Date: Tue, 31 Oct 2023 17:41:56 -0300
Subject: [PATCH] fixup! tests/migration-test: Add a test for postcopy hangs
during RECOVER
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
tests/qtest/migration-test.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 2359d349cf..604ffe7746 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1417,6 +1417,7 @@ static void wait_for_postcopy_status(QTestState *one, const char *status)
"completed", NULL });
}
+#ifndef _WIN32
static void postcopy_recover_fail(QTestState *from, QTestState *to)
{
int ret, pair1[2], pair2[2];
@@ -1481,6 +1482,7 @@ static void postcopy_recover_fail(QTestState *from, QTestState *to)
close(pair2[0]);
close(pair2[1]);
}
+#endif
static void test_postcopy_recovery_common(MigrateCommon *args)
{
@@ -1520,6 +1522,7 @@ static void test_postcopy_recovery_common(MigrateCommon *args)
wait_for_postcopy_status(to, "postcopy-paused");
wait_for_postcopy_status(from, "postcopy-paused");
+#ifndef _WIN32
if (args->postcopy_recovery_test_fail) {
/*
* Test when a wrong socket specified for recover, and then the
@@ -1528,6 +1531,7 @@ static void test_postcopy_recovery_common(MigrateCommon *args)
postcopy_recover_fail(from, to);
/* continue with a good recovery */
}
+#endif
/*
* Create a new socket to emulate a new channel that is different
@@ -1565,6 +1569,7 @@ static void test_postcopy_recovery_compress(void)
test_postcopy_recovery_common(&args);
}
+#ifndef _WIN32
static void test_postcopy_recovery_double_fail(void)
{
MigrateCommon args = {
@@ -1573,6 +1578,7 @@ static void test_postcopy_recovery_double_fail(void)
test_postcopy_recovery_common(&args);
}
+#endif
#ifdef CONFIG_GNUTLS
static void test_postcopy_recovery_tls_psk(void)
@@ -3185,9 +3191,10 @@ int main(int argc, char **argv)
qtest_add_func("/migration/postcopy/recovery/compress/plain",
test_postcopy_recovery_compress);
}
+#ifndef _WIN32
qtest_add_func("/migration/postcopy/recovery/double-failures",
test_postcopy_recovery_double_fail);
-
+#endif
}
qtest_add_func("/migration/bad_dest", test_baddest);
--
2.35.3
next prev parent reply other threads:[~2023-10-31 22:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 20:26 [PATCH v4 0/5] migration: Better error handling in rp thread, allow failures in recover Peter Xu
2023-10-17 20:26 ` [PATCH v4 1/5] migration: Refactor error handling in source return path Peter Xu
2023-10-19 21:09 ` Fabiano Rosas
2023-10-31 13:47 ` Juan Quintela
2023-10-17 20:26 ` [PATCH v4 2/5] migration: Allow network to fail even during recovery Peter Xu
2023-10-31 14:26 ` Juan Quintela
2023-10-31 15:32 ` Peter Xu
2023-10-17 20:26 ` [PATCH v4 3/5] tests/migration-test: Add a test for postcopy hangs during RECOVER Peter Xu
2023-10-31 22:01 ` Fabiano Rosas [this message]
2023-10-31 22:19 ` Peter Xu
2023-10-31 22:34 ` Juan Quintela
2023-10-17 20:26 ` [PATCH v4 4/5] migration: Change ram_dirty_bitmap_reload() retval to bool Peter Xu
2023-10-19 21:12 ` Fabiano Rosas
2023-10-31 14:30 ` Juan Quintela
2023-10-17 20:26 ` [PATCH v4 5/5] migration: Change ram_save_queue_pages() " Peter Xu
2023-10-19 21:13 ` Fabiano Rosas
2023-10-31 14:34 ` Juan Quintela
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=87o7gecuzl.fsf@suse.de \
--to=farosas@suse.de \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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 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.