migration-test: Allow test to run without uffd
We used to stop running all tests if uffd is not detected. However logically that's only needed for postcopy not the rest of tests. Keep running the rest when still possible. Signed-off-by: Peter Xu <peterx@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220728133516.92061-3-peterx@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
219044b8e6
commit
2649a72555
@ -2424,14 +2424,11 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
char template[] = "/tmp/migration-test-XXXXXX";
|
char template[] = "/tmp/migration-test-XXXXXX";
|
||||||
const bool has_kvm = qtest_has_accel("kvm");
|
const bool has_kvm = qtest_has_accel("kvm");
|
||||||
|
const bool has_uffd = ufd_version_check();
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
g_test_init(&argc, &argv, NULL);
|
g_test_init(&argc, &argv, NULL);
|
||||||
|
|
||||||
if (!ufd_version_check()) {
|
|
||||||
return g_test_run();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On ppc64, the test only works with kvm-hv, but not with kvm-pr and TCG
|
* On ppc64, the test only works with kvm-hv, but not with kvm-pr and TCG
|
||||||
* is touchy due to race conditions on dirty bits (especially on PPC for
|
* is touchy due to race conditions on dirty bits (especially on PPC for
|
||||||
@ -2460,6 +2457,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
module_call_init(MODULE_INIT_QOM);
|
module_call_init(MODULE_INIT_QOM);
|
||||||
|
|
||||||
|
if (has_uffd) {
|
||||||
qtest_add_func("/migration/postcopy/unix", test_postcopy);
|
qtest_add_func("/migration/postcopy/unix", test_postcopy);
|
||||||
qtest_add_func("/migration/postcopy/plain", test_postcopy);
|
qtest_add_func("/migration/postcopy/plain", test_postcopy);
|
||||||
qtest_add_func("/migration/postcopy/recovery/plain",
|
qtest_add_func("/migration/postcopy/recovery/plain",
|
||||||
@ -2467,6 +2465,7 @@ int main(int argc, char **argv)
|
|||||||
qtest_add_func("/migration/postcopy/preempt/plain", test_postcopy_preempt);
|
qtest_add_func("/migration/postcopy/preempt/plain", test_postcopy_preempt);
|
||||||
qtest_add_func("/migration/postcopy/preempt/recovery/plain",
|
qtest_add_func("/migration/postcopy/preempt/recovery/plain",
|
||||||
test_postcopy_preempt_recovery);
|
test_postcopy_preempt_recovery);
|
||||||
|
}
|
||||||
|
|
||||||
qtest_add_func("/migration/bad_dest", test_baddest);
|
qtest_add_func("/migration/bad_dest", test_baddest);
|
||||||
qtest_add_func("/migration/precopy/unix/plain", test_precopy_unix_plain);
|
qtest_add_func("/migration/precopy/unix/plain", test_precopy_unix_plain);
|
||||||
@ -2474,6 +2473,8 @@ int main(int argc, char **argv)
|
|||||||
#ifdef CONFIG_GNUTLS
|
#ifdef CONFIG_GNUTLS
|
||||||
qtest_add_func("/migration/precopy/unix/tls/psk",
|
qtest_add_func("/migration/precopy/unix/tls/psk",
|
||||||
test_precopy_unix_tls_psk);
|
test_precopy_unix_tls_psk);
|
||||||
|
|
||||||
|
if (has_uffd) {
|
||||||
/*
|
/*
|
||||||
* NOTE: psk test is enough for postcopy, as other types of TLS
|
* NOTE: psk test is enough for postcopy, as other types of TLS
|
||||||
* channels are tested under precopy. Here what we want to test is the
|
* channels are tested under precopy. Here what we want to test is the
|
||||||
@ -2486,6 +2487,7 @@ int main(int argc, char **argv)
|
|||||||
test_postcopy_preempt_tls_psk);
|
test_postcopy_preempt_tls_psk);
|
||||||
qtest_add_func("/migration/postcopy/preempt/recovery/tls/psk",
|
qtest_add_func("/migration/postcopy/preempt/recovery/tls/psk",
|
||||||
test_postcopy_preempt_all);
|
test_postcopy_preempt_all);
|
||||||
|
}
|
||||||
#ifdef CONFIG_TASN1
|
#ifdef CONFIG_TASN1
|
||||||
qtest_add_func("/migration/precopy/unix/tls/x509/default-host",
|
qtest_add_func("/migration/precopy/unix/tls/x509/default-host",
|
||||||
test_precopy_unix_tls_x509_default_host);
|
test_precopy_unix_tls_x509_default_host);
|
||||||
|
Loading…
Reference in New Issue
Block a user