mirror of https://github.com/xemu-project/xemu.git
tests/migration-tests: Drop most WIN32 ifdefs for postcopy failure tests
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> Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
parent
21e89f7ad5
commit
0fd3973595
|
@ -1364,9 +1364,9 @@ static void wait_for_postcopy_status(QTestState *one, const char *status)
|
||||||
"completed", NULL });
|
"completed", NULL });
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
static void postcopy_recover_fail(QTestState *from, QTestState *to)
|
static void postcopy_recover_fail(QTestState *from, QTestState *to)
|
||||||
{
|
{
|
||||||
|
#ifndef _WIN32
|
||||||
int ret, pair1[2], pair2[2];
|
int ret, pair1[2], pair2[2];
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
|
@ -1428,8 +1428,8 @@ static void postcopy_recover_fail(QTestState *from, QTestState *to)
|
||||||
close(pair1[1]);
|
close(pair1[1]);
|
||||||
close(pair2[0]);
|
close(pair2[0]);
|
||||||
close(pair2[1]);
|
close(pair2[1]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
static void test_postcopy_recovery_common(MigrateCommon *args)
|
static void test_postcopy_recovery_common(MigrateCommon *args)
|
||||||
{
|
{
|
||||||
|
@ -1469,7 +1469,6 @@ static void test_postcopy_recovery_common(MigrateCommon *args)
|
||||||
wait_for_postcopy_status(to, "postcopy-paused");
|
wait_for_postcopy_status(to, "postcopy-paused");
|
||||||
wait_for_postcopy_status(from, "postcopy-paused");
|
wait_for_postcopy_status(from, "postcopy-paused");
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
if (args->postcopy_recovery_test_fail) {
|
if (args->postcopy_recovery_test_fail) {
|
||||||
/*
|
/*
|
||||||
* Test when a wrong socket specified for recover, and then the
|
* Test when a wrong socket specified for recover, and then the
|
||||||
|
@ -1478,7 +1477,6 @@ static void test_postcopy_recovery_common(MigrateCommon *args)
|
||||||
postcopy_recover_fail(from, to);
|
postcopy_recover_fail(from, to);
|
||||||
/* continue with a good recovery */
|
/* continue with a good recovery */
|
||||||
}
|
}
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a new socket to emulate a new channel that is different
|
* Create a new socket to emulate a new channel that is different
|
||||||
|
@ -1507,7 +1505,6 @@ static void test_postcopy_recovery(void)
|
||||||
test_postcopy_recovery_common(&args);
|
test_postcopy_recovery_common(&args);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
static void test_postcopy_recovery_double_fail(void)
|
static void test_postcopy_recovery_double_fail(void)
|
||||||
{
|
{
|
||||||
MigrateCommon args = {
|
MigrateCommon args = {
|
||||||
|
@ -1516,7 +1513,6 @@ static void test_postcopy_recovery_double_fail(void)
|
||||||
|
|
||||||
test_postcopy_recovery_common(&args);
|
test_postcopy_recovery_common(&args);
|
||||||
}
|
}
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#ifdef CONFIG_GNUTLS
|
#ifdef CONFIG_GNUTLS
|
||||||
static void test_postcopy_recovery_tls_psk(void)
|
static void test_postcopy_recovery_tls_psk(void)
|
||||||
|
@ -3782,10 +3778,8 @@ int main(int argc, char **argv)
|
||||||
test_postcopy_preempt);
|
test_postcopy_preempt);
|
||||||
migration_test_add("/migration/postcopy/preempt/recovery/plain",
|
migration_test_add("/migration/postcopy/preempt/recovery/plain",
|
||||||
test_postcopy_preempt_recovery);
|
test_postcopy_preempt_recovery);
|
||||||
#ifndef _WIN32
|
|
||||||
migration_test_add("/migration/postcopy/recovery/double-failures",
|
migration_test_add("/migration/postcopy/recovery/double-failures",
|
||||||
test_postcopy_recovery_double_fail);
|
test_postcopy_recovery_double_fail);
|
||||||
#endif /* _WIN32 */
|
|
||||||
if (is_x86) {
|
if (is_x86) {
|
||||||
migration_test_add("/migration/postcopy/suspend",
|
migration_test_add("/migration/postcopy/suspend",
|
||||||
test_postcopy_suspend);
|
test_postcopy_suspend);
|
||||||
|
|
Loading…
Reference in New Issue