]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/functional/aarch64/test_aspeed_ast2700: Move eth2 IP check into common function
authorJamin Lin <jamin_lin@aspeedtech.com>
Fri, 3 Oct 2025 07:21:06 +0000 (15:21 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 13 Oct 2025 12:21:03 +0000 (14:21 +0200)
The eth2 IP address check was previously only performed in
test_aarch64_ast2700a1_evb_sdk_vbootrom_v09_08. This patch moves the
check into do_ast2700_pcie_test(), ensuring it is executed consistently
across all AST2700 PCIe test runs. This avoids code duplication.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251003072107.3530642-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
tests/functional/aarch64/test_aspeed_ast2700.py

index 0e9f10d991ea02e444caa31367ab301593cbbb13..ef7ed522afc31d774ee1fb9898da6d9d46806076 100755 (executable)
@@ -74,6 +74,9 @@ class AST2x00MachineSDK(QemuSystemTest):
             'lspci -s 0002:01:00.0',
             '0002:01:00.0 Ethernet controller: '
             'Intel Corporation 82574L Gigabit Network Connection')
+        exec_command_and_wait_for_pattern(self,
+            'ip addr show dev eth2',
+            'inet 10.0.2.15/24')
 
     def start_ast2700_test(self, name):
         num_cpu = 4
@@ -153,9 +156,6 @@ class AST2x00MachineSDK(QemuSystemTest):
         self.verify_openbmc_boot_and_login('ast2700-default')
         self.do_ast2700_i2c_test()
         self.do_ast2700_pcie_test()
-        exec_command_and_wait_for_pattern(self,
-            'ip addr show dev eth2',
-            'inet 10.0.2.15/24')
 
 if __name__ == '__main__':
     QemuSystemTest.main()