]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests/qtest: migration-test: Skip running test_migrate_fd_proto on win32
authorBin Meng <bin.meng@windriver.com>
Wed, 24 Aug 2022 09:39:59 +0000 (17:39 +0800)
committerThomas Huth <thuth@redhat.com>
Thu, 25 Aug 2022 13:24:09 +0000 (15:24 +0200)
The test case 'test_migrate_fd_proto' calls socketpair() which does
not exist on win32. Exclude it. The helper function wait_command_fd()
is not needed anymore, hence exclude it too.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20220824094029.1634519-22-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/migration-helpers.c
tests/qtest/migration-helpers.h
tests/qtest/migration-test.c

index c6fbeb3974854a9f9f5d3267ed4ba99c094eda79..f6f3c6680f57fc47e039f48340d28148365bf614 100644 (file)
@@ -34,6 +34,7 @@ static void check_stop_event(QTestState *who)
     }
 }
 
+#ifndef _WIN32
 /*
  * Events can get in the way of responses we are actually waiting for.
  */
@@ -58,6 +59,7 @@ QDict *wait_command_fd(QTestState *who, int fd, const char *command, ...)
 
     return ret;
 }
+#endif
 
 /*
  * Events can get in the way of responses we are actually waiting for.
index 59561898d0464f68f90348fa8c5239d72c638a66..db0684de48b21198ae8775bb726c70a0ebb7f0ba 100644 (file)
 
 extern bool got_stop;
 
+#ifndef _WIN32
 G_GNUC_PRINTF(3, 4)
 QDict *wait_command_fd(QTestState *who, int fd, const char *command, ...);
+#endif
 
 G_GNUC_PRINTF(2, 3)
 QDict *wait_command(QTestState *who, const char *command, ...);
index 18d30bfc3c042ef6f6b65a9bf2a90d1a96e5f816..4728d528bbeed54aaad73cd0cf6cf9e7a7a973b2 100644 (file)
@@ -1631,6 +1631,7 @@ static void test_precopy_tcp_tls_x509_reject_anon_client(void)
 #endif /* CONFIG_TASN1 */
 #endif /* CONFIG_GNUTLS */
 
+#ifndef _WIN32
 static void *test_migrate_fd_start_hook(QTestState *from,
                                         QTestState *to)
 {
@@ -1699,6 +1700,7 @@ static void test_migrate_fd_proto(void)
     };
     test_precopy_common(&args);
 }
+#endif /* _WIN32 */
 
 static void do_test_validate_uuid(MigrateStart *args, bool should_fail)
 {
@@ -2531,7 +2533,9 @@ int main(int argc, char **argv)
 #endif /* CONFIG_GNUTLS */
 
     /* qtest_add_func("/migration/ignore_shared", test_ignore_shared); */
+#ifndef _WIN32
     qtest_add_func("/migration/fd_proto", test_migrate_fd_proto);
+#endif
     qtest_add_func("/migration/validate_uuid", test_validate_uuid);
     qtest_add_func("/migration/validate_uuid_error", test_validate_uuid_error);
     qtest_add_func("/migration/validate_uuid_src_not_set",