[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 3/5] tests/migration-test: Add a test for postcopy hangs d
|
From: |
Fabiano Rosas |
|
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 |
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
- [PATCH v4 0/5] migration: Better error handling in rp thread, allow failures in recover, Peter Xu, 2023/10/17
- [PATCH v4 1/5] migration: Refactor error handling in source return path, Peter Xu, 2023/10/17
- [PATCH v4 2/5] migration: Allow network to fail even during recovery, Peter Xu, 2023/10/17
- [PATCH v4 3/5] tests/migration-test: Add a test for postcopy hangs during RECOVER, Peter Xu, 2023/10/17
- Re: [PATCH v4 3/5] tests/migration-test: Add a test for postcopy hangs during RECOVER,
Fabiano Rosas <=
- [PATCH v4 4/5] migration: Change ram_dirty_bitmap_reload() retval to bool, Peter Xu, 2023/10/17
- [PATCH v4 5/5] migration: Change ram_save_queue_pages() retval to bool, Peter Xu, 2023/10/17