From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
Bandan Das <bdas@redhat.com>, Zhijian Li <lizhijian@fujitsu.com>,
Fabiano Rosas <farosas@suse.de>,
Jiri Denemark <jdenemar@redhat.com>,
Prasad Pandit <ppandit@redhat.com>,
Eric Blake <eblake@redhat.com>,
peterx@redhat.com
Subject: [PATCH v3 07/11] tests/migration-tests: Drop most WIN32 ifdefs for postcopy failure tests
Date: Wed, 19 Jun 2024 18:30:42 -0400 [thread overview]
Message-ID: <20240619223046.1798968-8-peterx@redhat.com> (raw)
In-Reply-To: <20240619223046.1798968-1-peterx@redhat.com>
Most of them are not needed, we can stick with one ifdef inside
postcopy_recover_fail() so as to cover the scm right tricks only.
The tests won't run on windows anyway due to has_uffd always false.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
tests/qtest/migration-test.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 85a21ff5e9..640713bfd5 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1363,9 +1363,9 @@ static void wait_for_postcopy_status(QTestState *one, const char *status)
"completed", NULL });
}
-#ifndef _WIN32
static void postcopy_recover_fail(QTestState *from, QTestState *to)
{
+#ifndef _WIN32
int ret, pair1[2], pair2[2];
char c;
@@ -1427,8 +1427,8 @@ static void postcopy_recover_fail(QTestState *from, QTestState *to)
close(pair1[1]);
close(pair2[0]);
close(pair2[1]);
+#endif
}
-#endif /* _WIN32 */
static void test_postcopy_recovery_common(MigrateCommon *args)
{
@@ -1468,7 +1468,6 @@ 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
@@ -1477,7 +1476,6 @@ static void test_postcopy_recovery_common(MigrateCommon *args)
postcopy_recover_fail(from, to);
/* continue with a good recovery */
}
-#endif /* _WIN32 */
/*
* Create a new socket to emulate a new channel that is different
@@ -1506,7 +1504,6 @@ static void test_postcopy_recovery(void)
test_postcopy_recovery_common(&args);
}
-#ifndef _WIN32
static void test_postcopy_recovery_double_fail(void)
{
MigrateCommon args = {
@@ -1515,7 +1512,6 @@ static void test_postcopy_recovery_double_fail(void)
test_postcopy_recovery_common(&args);
}
-#endif /* _WIN32 */
#ifdef CONFIG_GNUTLS
static void test_postcopy_recovery_tls_psk(void)
@@ -3693,10 +3689,8 @@ int main(int argc, char **argv)
test_postcopy_preempt);
migration_test_add("/migration/postcopy/preempt/recovery/plain",
test_postcopy_preempt_recovery);
-#ifndef _WIN32
migration_test_add("/migration/postcopy/recovery/double-failures",
test_postcopy_recovery_double_fail);
-#endif /* _WIN32 */
if (is_x86) {
migration_test_add("/migration/postcopy/suspend",
test_postcopy_suspend);
--
2.45.0
next prev parent reply other threads:[~2024-06-19 22:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 22:30 [PATCH v3 00/11] migration: New postcopy state, and some cleanups Peter Xu
2024-06-19 22:30 ` [PATCH v3 01/11] migration/multifd: Avoid the final FLUSH in complete() Peter Xu
2024-06-19 22:30 ` [PATCH v3 02/11] migration: Rename thread debug names Peter Xu
2024-06-19 22:30 ` [PATCH v3 03/11] migration: Use MigrationStatus instead of int Peter Xu
2024-06-19 22:30 ` [PATCH v3 04/11] migration: Cleanup incoming migration setup state change Peter Xu
2024-06-19 22:30 ` [PATCH v3 05/11] migration/postcopy: Add postcopy-recover-setup phase Peter Xu
2024-06-19 22:30 ` [PATCH v3 06/11] migration/docs: Update postcopy recover session for SETUP phase Peter Xu
2024-06-19 22:30 ` Peter Xu [this message]
2024-06-19 22:30 ` [PATCH v3 08/11] tests/migration-tests: Always enable migration events Peter Xu
2024-06-20 13:20 ` Fabiano Rosas
2024-06-19 22:30 ` [PATCH v3 09/11] tests/migration-tests: migration_event_wait() Peter Xu
2024-06-20 13:21 ` Fabiano Rosas
2024-06-19 22:30 ` [PATCH v3 10/11] tests/migration-tests: Verify postcopy-recover-setup status Peter Xu
2024-06-20 13:21 ` Fabiano Rosas
2024-06-19 22:30 ` [PATCH v3 11/11] tests/migration-tests: Cover postcopy failure on reconnect Peter Xu
2024-06-21 17:38 ` [PATCH v3 00/11] migration: New postcopy state, and some cleanups 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=20240619223046.1798968-8-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=bdas@redhat.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=jdenemar@redhat.com \
--cc=lizhijian@fujitsu.com \
--cc=ppandit@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 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).