qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests: migration-test: Allow test to run without uffd
@ 2022-07-07 18:46 Peter Xu
  2022-07-08  9:57 ` Daniel P. Berrangé
  2022-07-18 18:23 ` Thomas Huth
  0 siblings, 2 replies; 14+ messages in thread
From: Peter Xu @ 2022-07-07 18:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Leonardo Bras Soares Passos, Dr . David Alan Gilbert,
	Daniel P . Berrange, peterx, Juan Quintela

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>
---
 tests/qtest/migration-test.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 9e64125f02..55acf9612c 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -2086,14 +2086,11 @@ int main(int argc, char **argv)
 {
     char template[] = "/tmp/migration-test-XXXXXX";
     const bool has_kvm = qtest_has_accel("kvm");
+    const bool has_uffd = ufd_version_check();
     int ret;
 
     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
      * is touchy due to race conditions on dirty bits (especially on PPC for
@@ -2122,8 +2119,10 @@ int main(int argc, char **argv)
 
     module_call_init(MODULE_INIT_QOM);
 
-    qtest_add_func("/migration/postcopy/unix", test_postcopy);
-    qtest_add_func("/migration/postcopy/recovery", test_postcopy_recovery);
+    if (has_uffd) {
+        qtest_add_func("/migration/postcopy/unix", test_postcopy);
+        qtest_add_func("/migration/postcopy/recovery", test_postcopy_recovery);
+    }
     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/xbzrle", test_precopy_unix_xbzrle);
-- 
2.32.0



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-07-22  8:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-07 18:46 [PATCH] tests: migration-test: Allow test to run without uffd Peter Xu
2022-07-08  9:57 ` Daniel P. Berrangé
2022-07-18 18:23 ` Thomas Huth
2022-07-18 19:14   ` Peter Xu
2022-07-19  8:32     ` Daniel P. Berrangé
2022-07-19 10:28     ` Thomas Huth
2022-07-19 10:37       ` Daniel P. Berrangé
2022-07-19 19:53         ` Peter Xu
2022-07-20 10:52           ` Thomas Huth
2022-07-20 12:55             ` Peter Xu
2022-07-20 14:11         ` Thomas Huth
2022-07-20 14:32           ` Daniel P. Berrangé
2022-07-21 18:24             ` Peter Xu
2022-07-22  8:14               ` Thomas Huth

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).