]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/functional/aarch64: Parameterize PCIe2 initialization in AST2700
authorKane Chen <kane_chen@aspeedtech.com>
Wed, 4 Feb 2026 08:21:44 +0000 (08:21 +0000)
committerCédric Le Goater <clg@redhat.com>
Wed, 4 Feb 2026 09:10:57 +0000 (10:10 +0100)
The current AST2700 functional test forces PCIe2 enablement by manually
manipulating U-Boot env and FDT via the console. This sequence
interferes with test cases that rely on the default boot flow of the
image.

Introduce a 'enable_pcie' parameter (defaulting to True) to both
'verify_openbmc_boot_start' and 'verify_openbmc_boot_and_login' methods.
This allow test cases to toggle the PCIe2 initialization sequence based
on their specific requirements without breaking standard boot tests.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-22-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
tests/functional/aarch64/test_aspeed_ast2700.py

index d7eeab9c23fd1f11a4f470dd851611a8c98044c0..cb1aafeb99faa194a087aaf5988a096be9e05566 100755 (executable)
@@ -65,13 +65,14 @@ class AST2x00MachineSDK(QemuSystemTest):
             'fdt set /soc@14000000/pcie@140d0000 status "okay"', '=>')
         exec_command(self, 'bootm go')
 
-    def verify_openbmc_boot_start(self):
+    def verify_openbmc_boot_start(self, enable_pcie=True):
         wait_for_console_pattern(self, 'U-Boot 2023.10')
-        self.enable_ast2700_pcie2()
+        if enable_pcie:
+            self.enable_ast2700_pcie2()
         wait_for_console_pattern(self, 'Linux version ')
 
-    def verify_openbmc_boot_and_login(self, name):
-        self.verify_openbmc_boot_start()
+    def verify_openbmc_boot_and_login(self, name, enable_pcie=True):
+        self.verify_openbmc_boot_start(enable_pcie)
 
         wait_for_console_pattern(self, f'{name} login:')
         exec_command_and_wait_for_pattern(self, 'root', 'Password:')