[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] tests/avocado: Add powernv machine test script
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH 4/4] tests/avocado: Add powernv machine test script |
Date: |
Mon, 3 Jul 2023 13:41:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 |
On 7/3/23 12:17, Nicholas Piggin wrote:
This copies ppc_pseries.py to start a set of powernv tests, including
a Linux boot test for the newly added SMT mode.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
A couple of suggestions below,
---
tests/avocado/ppc_powernv.py | 86 ++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
create mode 100644 tests/avocado/ppc_powernv.py
diff --git a/tests/avocado/ppc_powernv.py b/tests/avocado/ppc_powernv.py
new file mode 100644
index 0000000000..f72e87bc70
--- /dev/null
+++ b/tests/avocado/ppc_powernv.py
@@ -0,0 +1,86 @@
+# Test that Linux kernel boots on ppc powernv machines and check the console
+#
+# Copyright (c) 2018, 2020 Red Hat, Inc.
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later. See the COPYING file in the top-level directory.
+
+from avocado.utils import archive
+from avocado_qemu import QemuSystemTest
+from avocado_qemu import wait_for_console_pattern
+
+class powernvMachine(QemuSystemTest):
+
+ timeout = 90
+ KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
+ panic_message = 'Kernel panic - not syncing'
+ good_message = 'VFS: Cannot open root device'
+
+ def do_test_linux_boot(self):
+ self.require_accelerator("tcg")
+ kernel_url = ('https://archives.fedoraproject.org/pub/archive'
+ '/fedora-secondary/releases/29/Everything/ppc64le/os'
+ '/ppc/ppc64/vmlinuz')
f29 does support P10 :
Linux version 4.18.16-300.fc29.ppc64le
(mockbuild@buildvm-ppc64le-03.ppc.fedoraproject.org) (gcc version 8.2.1
20180801 (Red Hat 8.2.1-2) (GCC)) #1 SMP Sat Oct 20 23:28:27 UTC 2018
What about :
https://archives.fedoraproject.org/pub/archive/fedora-secondary/releases/36/Everything/ppc64le/os/ppc/ppc64/
+ kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
+ kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+
+ self.vm.set_console()
+ kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0'
+ self.vm.add_args('-kernel', kernel_path,
+ '-append', kernel_command_line)
+ self.vm.launch()
+
+ def test_linux_boot(self):
+ """
+ :avocado: tags=arch:ppc64
+ :avocado: tags=machine:powernv
This defaults to POWER9 cpus. No POWER10 ?
+ :avocado: tags=accel:tcg
+ """
+
+ self.do_test_linux_boot()
+ console_pattern = 'VFS: Cannot open root device'
+ wait_for_console_pattern(self, console_pattern, self.panic_message)
+
+ def test_linux_smp_boot(self):
+ """
+ :avocado: tags=arch:ppc64
+ :avocado: tags=machine:powernv
+ :avocado: tags=accel:tcg
+ """
+
+ self.vm.add_args('-smp', '4')
+ self.do_test_linux_boot()
+ console_pattern = 'smp: Brought up 1 node, 4 CPUs'
+ wait_for_console_pattern(self, console_pattern, self.panic_message)
+ wait_for_console_pattern(self, self.good_message, self.panic_message)
+
+ def test_linux_smt_boot(self):
+ """
+ :avocado: tags=arch:ppc64
+ :avocado: tags=machine:powernv
+ :avocado: tags=accel:tcg
+ """
+
+ self.vm.add_args('-smp', '4,threads=4')
+ self.do_test_linux_boot()
+ console_pattern = 'CPU maps initialized for 4 threads per core'
+ wait_for_console_pattern(self, console_pattern, self.panic_message)
+ console_pattern = 'smp: Brought up 1 node, 4 CPUs'
+ wait_for_console_pattern(self, console_pattern, self.panic_message)
+ wait_for_console_pattern(self, self.good_message, self.panic_message)
+
+ def test_linux_big_boot(self):
+ """
+ :avocado: tags=arch:ppc64
+ :avocado: tags=machine:powernv
+ :avocado: tags=accel:tcg
+ """
+
+ self.vm.add_args('-smp', '8,threads=4,cores=2,sockets=1')
I would test 2 sockets.
Thanks,
C.
+ # powernv does not support NUMA
+ self.do_test_linux_boot()
+ console_pattern = 'CPU maps initialized for 4 threads per core'
+ wait_for_console_pattern(self, console_pattern, self.panic_message)
+ console_pattern = 'smp: Brought up 1 node, 8 CPUs'
+ wait_for_console_pattern(self, console_pattern, self.panic_message)
+ wait_for_console_pattern(self, self.good_message, self.panic_message)
- [PATCH 0/4] ppc/pnv: SMT support for powernv, Nicholas Piggin, 2023/07/03
- [PATCH 1/4] target/ppc: Add LPAR-per-core vs per-thread mode flag, Nicholas Piggin, 2023/07/03
- [PATCH 2/4] target/ppc: SMT support for the HID SPR, Nicholas Piggin, 2023/07/03
- [PATCH 3/4] ppc/pnv: SMT support for powernv, Nicholas Piggin, 2023/07/03
- [PATCH 4/4] tests/avocado: Add powernv machine test script, Nicholas Piggin, 2023/07/03
- Re: [PATCH 4/4] tests/avocado: Add powernv machine test script,
Cédric Le Goater <=
- Re: [PATCH 0/4] ppc/pnv: SMT support for powernv, Cédric Le Goater, 2023/07/03