@samitouri / QOSamiQemu / commits / 39ac69238f

tests/functional/aspeed: introduce FacebookAspeedTest

Facebook OpenBMC Images include an early script [1] that lowers the console log level to warning. This suppresses the "Hostname set to" message from the serial console. Introduce FacebookAspeedTest (a subclass of AspeedTest), that waits for login prompt instead. Update bletchley-bmc and catalina-bmc to use the new class. This is also used by the anacapa-bmc machine introduced in the following patch. [1]: https://github.com/openbmc/openbmc/blob/6a56a45931fb7015a3fc18553415909105b484d6/meta-facebook/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/999-reduce-printk Signed-off-by: William de Abreu Pinho <williamdapinho@gmail.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260519-add-anacapa-machine-v3-1-56c23993a20a@gmail.com Signed-off-by: Cédric Le Goater <clg@redhat.com>

William de Abreu Pinho committed May 19, 2026 at 10:48 UTC 39ac69238feae0c9491b86c658a3a9117d53e759
3 files changed +14 -6
tests/functional/arm/test_aspeed_bletchley.py
+3 -3
@@ -5,10 +5,10 @@
5 # SPDX-License-Identifier: GPL-2.0-or-later
6
7 from qemu_test import Asset
8 -from aspeed import AspeedTest
8 +from aspeed import FacebookAspeedTest
9
10
11 -class BletchleyMachine(AspeedTest):
11 +class BletchleyMachine(FacebookAspeedTest):
12
13 ASSET_BLETCHLEY_FLASH = Asset(
14 'https://github.com/legoater/qemu-aspeed-boot/raw/master/images/bletchley-bmc/openbmc-20250128071329/obmc-phosphor-image-bletchley-20250128071329.static.mtd.xz',
@@ -22,4 +22,4 @@ class BletchleyMachine(AspeedTest):
22 soc='AST2600 rev A3')
23
24 if __name__ == '__main__':
25 - AspeedTest.main()
25 + FacebookAspeedTest.main()
tests/functional/arm/test_aspeed_catalina.py
+3 -3
@@ -5,10 +5,10 @@
5 # SPDX-License-Identifier: GPL-2.0-or-later
6
7 from qemu_test import Asset
8 -from aspeed import AspeedTest
8 +from aspeed import FacebookAspeedTest
9
10
11 -class CatalinaMachine(AspeedTest):
11 +class CatalinaMachine(FacebookAspeedTest):
12
13 ASSET_CATALINA_FLASH = Asset(
14 'https://github.com/legoater/qemu-aspeed-boot/raw/a866feb5ef81245b4827a214584bf6bcc72939f6/images/catalina-bmc/obmc-phosphor-image-catalina-20250619123021.static.mtd.xz',
@@ -22,4 +22,4 @@ class CatalinaMachine(AspeedTest):
22 soc='AST2600 rev A3')
23
24 if __name__ == '__main__':
25 - AspeedTest.main()
25 + FacebookAspeedTest.main()
tests/functional/aspeed.py
+8
@@ -28,6 +28,9 @@ class AspeedTest(LinuxKernelTest):
28 self.wait_for_console_pattern(f'Booting Linux on physical CPU {cpu_id}')
29 self.wait_for_console_pattern(f'ASPEED {soc}')
30 self.wait_for_console_pattern('/init as init process')
31 + self.wait_for_boot_complete(hostname)
32 +
33 + def wait_for_boot_complete(self, hostname):
34 self.wait_for_console_pattern(f'systemd[1]: Hostname set to <{hostname}>.')
35
36 def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'):
@@ -69,3 +72,8 @@ class AspeedTest(LinuxKernelTest):
72 f.write(pattern)
73 return path
74
75 +
76 +class FacebookAspeedTest(AspeedTest):
77 +
78 + def wait_for_boot_complete(self, hostname):
79 + self.wait_for_console_pattern(f'{hostname} login:')