[PATCH v1 5/5] tests/functional: Add Huygens BMC boot test

Mikail Sadic posted 5 patches 2 months ago
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Kane Chen <kane_chen@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, Ninad Palsule <ninad@linux.ibm.com>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <philmd@mailo.com>, Titus Rwantare <titusr@google.com>, Jeuk Kim <jeuk20.kim@samsung.com>
There is a newer version of this series
[PATCH v1 5/5] tests/functional: Add Huygens BMC boot test
Posted by Mikail Sadic 2 months ago
Add a functional test for the huygens-bmc machine that boots from FMC
flash and a UFS storage image, verifying the full boot sequence from
U-Boot through OpenBMC login and multi-user target.
Note: The Huygens img is not yet public, so this test is for future/internal
use. It has been tested/verified with the correct image, and will gracefully
exit if image is not found.

Signed-off-by: Mikail Sadic <mikail.sadic@ibm.com>
---
 tests/functional/aarch64/meson.build          |  2 +
 .../functional/aarch64/test_aspeed_huygens.py | 49 +++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100755 tests/functional/aarch64/test_aspeed_huygens.py

diff --git a/tests/functional/aarch64/meson.build b/tests/functional/aarch64/meson.build
index e81afd6c39..d81c0d6761 100644
--- a/tests/functional/aarch64/meson.build
+++ b/tests/functional/aarch64/meson.build
@@ -4,6 +4,7 @@ test_aarch64_timeouts = {
   'aspeed_ast2700a1' : 600,
   'aspeed_ast2700a2' : 600,
   'aspeed_ast2700fc' : 600,
+  'aspeed_huygens' : 600,
   'device_passthrough' : 720,
   'imx8mm_evk' : 240,
   'imx8mp_evk' : 240,
@@ -29,6 +30,7 @@ tests_aarch64_system_thorough = [
   'aspeed_ast2700a1',
   'aspeed_ast2700a2',
   'aspeed_ast2700fc',
+  'aspeed_huygens',
   'device_passthrough',
   'hotplug_pci',
   'imx8mm_evk',
diff --git a/tests/functional/aarch64/test_aspeed_huygens.py b/tests/functional/aarch64/test_aspeed_huygens.py
new file mode 100755
index 0000000000..750d6e0d7f
--- /dev/null
+++ b/tests/functional/aarch64/test_aspeed_huygens.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+#
+# Functional test that boots the ASPEED Huygens machine with UFS storage
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import os
+
+from aspeed import AspeedTest
+
+class HuygensMachine(AspeedTest):
+
+    def test_arm_aspeed_ufs_boot(self):
+        self.set_machine('huygens-bmc')
+        self.require_netdev('user')
+
+        # Huygens image is not public yet, skip if missing
+        fmc_path = '/tmp/fmc-huygens.img'
+        ufs_path = '/tmp/ufs-huygens.img'
+
+        if not os.path.exists(fmc_path) or not os.path.exists(ufs_path):
+            self.skipTest(f'Missing required images: {fmc_path}, {ufs_path}')
+
+        self.vm.set_console()
+        self.vm.add_args('-drive',
+                         'file=' + fmc_path + ',if=mtd,format=raw',
+                         '-drive',
+                         'file=' + ufs_path +
+                         ',if=none,format=raw,readonly=off',
+                         '-nic', 'user,model=ftgmac100,net=10.0.2.0/24',
+                         '-nic', 'user,model=ftgmac100,net=10.0.3.0/24',
+                         '-nic', 'user,model=ftgmac100,net=10.0.4.0/24')
+        self.vm.launch()
+
+        self.wait_for_console_pattern('U-Boot 2023.10')
+        self.wait_for_console_pattern(
+            'Vendor: ASPEED Prod.: UFS QEMU Rev: 1.00')
+        self.wait_for_console_pattern('Starting kernel ...')
+        self.wait_for_console_pattern('Machine model: Huygens')
+        self.wait_for_console_pattern('Starting systemd-udevd version 257.1')
+        self.wait_for_console_pattern('Phosphor OpenBMC')
+        self.wait_for_console_pattern('huygens login:')
+        self.wait_for_console_pattern('Active BMC Target')
+        self.wait_for_console_pattern('Multi-User System')
+        self.vm.shutdown()
+
+
+if __name__ == '__main__':
+    AspeedTest.main()
-- 
2.53.0
Re: [PATCH v1 5/5] tests/functional: Add Huygens BMC boot test
Posted by Cédric Le Goater 2 months ago
On 7/15/26 17:50, Mikail Sadic wrote:
> Add a functional test for the huygens-bmc machine that boots from FMC
> flash and a UFS storage image, verifying the full boot sequence from
> U-Boot through OpenBMC login and multi-user target.
> Note: The Huygens img is not yet public, so this test is for future/internal
> use. It has been tested/verified with the correct image, and will gracefully
> exit if image is not found.
> 
> Signed-off-by: Mikail Sadic <mikail.sadic@ibm.com>
> ---
>   tests/functional/aarch64/meson.build          |  2 +
>   .../functional/aarch64/test_aspeed_huygens.py | 49 +++++++++++++++++++
>   2 files changed, 51 insertions(+)
>   create mode 100755 tests/functional/aarch64/test_aspeed_huygens.py
> 
> diff --git a/tests/functional/aarch64/meson.build b/tests/functional/aarch64/meson.build
> index e81afd6c39..d81c0d6761 100644
> --- a/tests/functional/aarch64/meson.build
> +++ b/tests/functional/aarch64/meson.build
> @@ -4,6 +4,7 @@ test_aarch64_timeouts = {
>     'aspeed_ast2700a1' : 600,
>     'aspeed_ast2700a2' : 600,
>     'aspeed_ast2700fc' : 600,
> +  'aspeed_huygens' : 600,
>     'device_passthrough' : 720,
>     'imx8mm_evk' : 240,
>     'imx8mp_evk' : 240,
> @@ -29,6 +30,7 @@ tests_aarch64_system_thorough = [
>     'aspeed_ast2700a1',
>     'aspeed_ast2700a2',
>     'aspeed_ast2700fc',
> +  'aspeed_huygens',
>     'device_passthrough',
>     'hotplug_pci',
>     'imx8mm_evk',
> diff --git a/tests/functional/aarch64/test_aspeed_huygens.py b/tests/functional/aarch64/test_aspeed_huygens.py
> new file mode 100755
> index 0000000000..750d6e0d7f
> --- /dev/null
> +++ b/tests/functional/aarch64/test_aspeed_huygens.py
> @@ -0,0 +1,49 @@
> +#!/usr/bin/env python3
> +#
> +# Functional test that boots the ASPEED Huygens machine with UFS storage
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +import os
> +
> +from aspeed import AspeedTest
> +
> +class HuygensMachine(AspeedTest):
> +
> +    def test_arm_aspeed_ufs_boot(self):
> +        self.set_machine('huygens-bmc')
> +        self.require_netdev('user')
> +
> +        # Huygens image is not public yet, skip if missing
> +        fmc_path = '/tmp/fmc-huygens.img'
> +        ufs_path = '/tmp/ufs-huygens.img'


This is dead code. resend when they are then.

Thanks,

C.


> +        if not os.path.exists(fmc_path) or not os.path.exists(ufs_path):
> +            self.skipTest(f'Missing required images: {fmc_path}, {ufs_path}')
> +
> +        self.vm.set_console()
> +        self.vm.add_args('-drive',
> +                         'file=' + fmc_path + ',if=mtd,format=raw',
> +                         '-drive',
> +                         'file=' + ufs_path +
> +                         ',if=none,format=raw,readonly=off',
> +                         '-nic', 'user,model=ftgmac100,net=10.0.2.0/24',
> +                         '-nic', 'user,model=ftgmac100,net=10.0.3.0/24',
> +                         '-nic', 'user,model=ftgmac100,net=10.0.4.0/24')
> +        self.vm.launch()
> +
> +        self.wait_for_console_pattern('U-Boot 2023.10')
> +        self.wait_for_console_pattern(
> +            'Vendor: ASPEED Prod.: UFS QEMU Rev: 1.00')
> +        self.wait_for_console_pattern('Starting kernel ...')
> +        self.wait_for_console_pattern('Machine model: Huygens')
> +        self.wait_for_console_pattern('Starting systemd-udevd version 257.1')
> +        self.wait_for_console_pattern('Phosphor OpenBMC')
> +        self.wait_for_console_pattern('huygens login:')
> +        self.wait_for_console_pattern('Active BMC Target')
> +        self.wait_for_console_pattern('Multi-User System')
> +        self.vm.shutdown()
> +
> +
> +if __name__ == '__main__':
> +    AspeedTest.main()