qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Leonardo Bras" <leobras@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH] qtest/migration: Document live=true cases
Date: Thu,  1 Jun 2023 13:29:35 -0400	[thread overview]
Message-ID: <20230601172935.175726-1-peterx@redhat.com> (raw)
In-Reply-To: <20230601161347.1803440-1-berrange@redhat.com>

Document every single live=true use cases on why it should be done in the
live manner.  Also document on the parameter so new precopy cases should
always use live=off unless with explicit reasonings.

Cc: Thomas Huth <thuth@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 tests/qtest/migration-test.c | 37 ++++++++++++++++++++++++++++++------
 1 file changed, 31 insertions(+), 6 deletions(-)

diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 298291f01c..d2cd71e6cf 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -682,7 +682,14 @@ typedef struct {
      */
     unsigned int iterations;
 
-    /* Optional: whether the guest CPUs should be running during migration */
+    /*
+     * Optional: whether the guest CPUs should be running during a precopy
+     * migration test.  We used to always run with live but it took much
+     * longer so we reduced live tests to only the ones that have solid
+     * reason to be tested live-only.  For each of the new test cases for
+     * precopy please provide justifications to use live explicitly (please
+     * refer to existing ones with live=true), or use live=off by default.
+     */
     bool live;
 
     /* Postcopy specific fields */
@@ -1592,7 +1599,10 @@ static void test_precopy_unix_plain(void)
     MigrateCommon args = {
         .listen_uri = uri,
         .connect_uri = uri,
-
+        /*
+         * The simplest use case of precopy, covering smoke tests of
+         * get-dirty-log dirty tracking.
+         */
         .live = true,
     };
 
@@ -1609,7 +1619,10 @@ static void test_precopy_unix_dirty_ring(void)
         },
         .listen_uri = uri,
         .connect_uri = uri,
-
+        /*
+         * Besides the precopy/unix basic test, cover dirty ring interface
+         * rather than get-dirty-log.
+         */
         .live = true,
     };
 
@@ -1721,10 +1734,12 @@ static void test_precopy_unix_xbzrle(void)
     MigrateCommon args = {
         .connect_uri = uri,
         .listen_uri = uri,
-
         .start_hook = test_migrate_xbzrle_start,
-
         .iterations = 2,
+        /*
+         * XBZRLE needs pages to be modified when doing the 2nd+ round
+         * iteration to have real data pushed to the stream.
+         */
         .live = true,
     };
 
@@ -1743,6 +1758,11 @@ static void test_precopy_unix_compress(void)
          * the previous iteration.
          */
         .iterations = 2,
+        /*
+         * We make sure the compressor can always work well even if guest
+         * memory is changing.  See commit 34ab9e9743 where we used to fix
+         * a bug when only trigger-able with guest memory changing.
+         */
         .live = true,
     };
 
@@ -1761,6 +1781,7 @@ static void test_precopy_unix_compress_nowait(void)
          * the previous iteration.
          */
         .iterations = 2,
+        /* Same reason for the wait version of precopy compress test */
         .live = true,
     };
 
@@ -2170,7 +2191,11 @@ static void test_multifd_tcp_none(void)
     MigrateCommon args = {
         .listen_uri = "defer",
         .start_hook = test_migrate_precopy_tcp_multifd_start,
-
+        /*
+         * Multifd is more complicated than most of the features, it
+         * directly takes guest page buffers when sending, make sure
+         * everything will work alright even if guest page is changing.
+         */
         .live = true,
     };
     test_precopy_common(&args);
-- 
2.40.1



  parent reply	other threads:[~2023-06-01 17:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 16:13 [PATCH v4 00/10] tests/qtest: make migration-test massively faster Daniel P. Berrangé
2023-06-01 16:13 ` [PATCH v4 01/10] tests/qtest: add various qtest_qmp_assert_success() variants Daniel P. Berrangé
2023-06-01 22:44   ` Juan Quintela
2023-06-01 16:13 ` [PATCH v4 02/10] tests/qtest: add support for callback to receive QMP events Daniel P. Berrangé
2023-06-01 22:45   ` Juan Quintela
2023-06-02  7:51   ` Thomas Huth
2023-06-01 16:13 ` [PATCH v4 03/10] tests/qtest: get rid of 'qmp_command' helper in migration test Daniel P. Berrangé
2023-06-02  7:52   ` Thomas Huth
2023-06-01 16:13 ` [PATCH v4 04/10] tests/qtest: get rid of some 'qtest_qmp' usage " Daniel P. Berrangé
2023-06-01 16:13 ` [PATCH v4 05/10] tests/qtest: switch to using event callbacks for STOP event Daniel P. Berrangé
2023-06-01 16:13 ` [PATCH v4 06/10] tests/qtest: replace wait_command() with qtest_qmp_assert_success Daniel P. Berrangé
2023-06-01 16:13 ` [PATCH v4 07/10] tests/qtest: capture RESUME events during migration Daniel P. Berrangé
2023-06-02  7:45   ` Juan Quintela
2023-06-01 16:13 ` [PATCH v4 08/10] tests/qtest: distinguish src/dst migration VM stop/resume events Daniel P. Berrangé
2023-06-01 22:47   ` Juan Quintela
2023-06-01 16:13 ` [PATCH v4 09/10] tests/qtest: make more migration pre-copy scenarios run non-live Daniel P. Berrangé
2023-06-01 22:50   ` Juan Quintela
2023-06-01 16:13 ` [PATCH v4 10/10] tests/qtest: massively speed up migration-test Daniel P. Berrangé
2023-06-01 17:29 ` Peter Xu [this message]
2023-06-01 18:22   ` [PATCH] qtest/migration: Document live=true cases Daniel P. Berrangé
2023-06-01 22:52   ` Juan Quintela
2023-07-03 16:37 ` [PATCH v4 00/10] tests/qtest: make migration-test massively faster Thomas Huth

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=20230601172935.175726-1-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=berrange@redhat.com \
    --cc=leobras@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.com \
    /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).