All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harsh Prateek Bora <harshpb@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: Fabiano Rosas <farosas@suse.de>, Thomas Huth <thuth@redhat.com>
Subject: [PULL 10/10] tests/functional: Add a OS level migration test for pseries
Date: Mon, 12 Jan 2026 16:04:33 +0530	[thread overview]
Message-ID: <20260112103433.8451-11-harshpb@linux.ibm.com> (raw)
In-Reply-To: <20260112103433.8451-1-harshpb@linux.ibm.com>

From: Fabiano Rosas <farosas@suse.de>

There's currently no OS level test for ppc64le. Add one such test by
reusing the boot level tests that are already present.

The test boots the source machine, waits for it to reach a mid-boot
message, migrates and checks that the destination has reached the
final boot message (VFS error due to no disk).

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/qemu-devel/20260109123519.28703-3-farosas@suse.de
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
---
 tests/functional/ppc64/test_migration.py | 12 ++++++++
 tests/functional/ppc64/test_pseries.py   | 35 ++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/tests/functional/ppc64/test_migration.py b/tests/functional/ppc64/test_migration.py
index 5dfdaaf709..a3b819680b 100755
--- a/tests/functional/ppc64/test_migration.py
+++ b/tests/functional/ppc64/test_migration.py
@@ -4,6 +4,7 @@
 #
 # ppc migration test
 
+from qemu_test.ports import Ports
 from migration import MigrationTest
 
 
@@ -21,6 +22,17 @@ def test_migration_with_exec(self):
         self.set_machine('mac99')
         self.migration_with_exec()
 
+    def do_migrate_ppc64_linux(self, source_vm, dest_vm):
+        with Ports() as ports:
+            port = ports.find_free_port()
+            if port is None:
+                self.skipTest('Failed to find a free port')
+            uri = 'tcp:localhost:%u' % port
+
+            dest_vm.qmp('migrate-incoming', uri=uri)
+            source_vm.qmp('migrate', uri=uri)
+            self.assert_migration(source_vm, dest_vm)
+
 
 if __name__ == '__main__':
     MigrationTest.main()
diff --git a/tests/functional/ppc64/test_pseries.py b/tests/functional/ppc64/test_pseries.py
index 7840c4e3ff..b45763c305 100755
--- a/tests/functional/ppc64/test_pseries.py
+++ b/tests/functional/ppc64/test_pseries.py
@@ -9,6 +9,7 @@
 
 from qemu_test import QemuSystemTest, Asset
 from qemu_test import wait_for_console_pattern
+from test_migration import PpcMigrationTest
 
 class PseriesMachine(QemuSystemTest):
 
@@ -87,5 +88,39 @@ def test_ppc64_linux_big_boot(self):
         wait_for_console_pattern(self, console_pattern, self.panic_message)
         wait_for_console_pattern(self, self.good_message, self.panic_message)
 
+    def test_ppc64_linux_migration(self):
+        self.set_machine('pseries')
+
+        kernel_path = self.ASSET_KERNEL.fetch()
+        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
+
+        dest_vm = self.get_vm(name="dest-qemu")
+        dest_vm.add_args('-incoming', 'defer')
+        dest_vm.add_args('-smp', '4')
+        dest_vm.add_args('-nodefaults')
+        dest_vm.add_args('-kernel', kernel_path,
+                         '-append', kernel_command_line)
+        dest_vm.set_console()
+        dest_vm.launch()
+
+        source_vm = self.get_vm(name="source-qemu")
+        source_vm.add_args('-smp', '4')
+        source_vm.add_args('-nodefaults')
+        source_vm.add_args('-kernel', kernel_path,
+                           '-append', kernel_command_line)
+        source_vm.set_console()
+        source_vm.launch()
+
+        # ensure the boot has reached Linux
+        console_pattern = 'smp: Brought up 1 node, 4 CPUs'
+        wait_for_console_pattern(self, console_pattern, self.panic_message,
+                                 vm=source_vm)
+
+        PpcMigrationTest().do_migrate_ppc64_linux(source_vm, dest_vm);
+
+        # ensure the boot proceeds after migration
+        wait_for_console_pattern(self, self.good_message, self.panic_message,
+                                 vm=dest_vm)
+
 if __name__ == '__main__':
     QemuSystemTest.main()
-- 
2.52.0



  parent reply	other threads:[~2026-01-12 10:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 10:34 [PULL 00/10] ppc-for-11.0 queue Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 01/10] target/ppc/kvm : Use macro names instead of hardcoded constants as return values Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 02/10] hw/ppc: Add VMSTATE information for LPC model Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 03/10] hw/ppc: Add pnv_spi vmstate support Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 04/10] hw/ppc: Add pnv_i2c " Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 05/10] hw/ppc: pnv_adu.c added " Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 06/10] hw/ppc: pnv_core.c add " Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 07/10] hw/ppc: pnv_chiptod.c " Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 08/10] hw/ppc: Add VMSTATE information to PnvPsi Harsh Prateek Bora
2026-01-12 10:34 ` [PULL 09/10] target/ppc: Fix env->quiesced migration Harsh Prateek Bora
2026-01-12 10:34 ` Harsh Prateek Bora [this message]
2026-01-13  0:50 ` [PULL 00/10] ppc-for-11.0 queue Richard Henderson

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=20260112103433.8451-11-harshpb@linux.ibm.com \
    --to=harshpb@linux.ibm.com \
    --cc=farosas@suse.de \
    --cc=qemu-devel@nongnu.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.