summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorKane-Chen-AS <kane_chen@aspeedtech.com>2025-09-17 11:59:17 +0800
committerCédric Le Goater <clg@redhat.com>2025-09-29 18:00:20 +0200
commit2057685f0b02f06ae2aec0627489421f06bc7796 (patch)
tree2f0e30d38ea65752a34e212ea5d4691431bf9002 /tests
parentfb89ceac92012d154f1113190e24e45a42f396fc (diff)
downloadfocaccia-qemu-2057685f0b02f06ae2aec0627489421f06bc7796.tar.gz
focaccia-qemu-2057685f0b02f06ae2aec0627489421f06bc7796.zip
tests/functional/arm: Add AST2600 boot test with generated OTP image
Add a functional test that boots an AST2600 machine with a generated
OTP image. The test verifies that OTP contents are read during early
boot and that the system reaches the expected console prompt.

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/20250917035917.4141723-4-kane_chen@aspeedtech.com
[ clg: checkpath fixes ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/functional/arm/test_aspeed_ast2600.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional/arm/test_aspeed_ast2600.py b/tests/functional/arm/test_aspeed_ast2600.py
index 129695ca4e..62949b0b4f 100755
--- a/tests/functional/arm/test_aspeed_ast2600.py
+++ b/tests/functional/arm/test_aspeed_ast2600.py
@@ -136,5 +136,20 @@ class AST2600Machine(AspeedTest):
         exec_command_and_wait_for_pattern(self,
              '/sbin/hwclock -f /dev/rtc1', year)
 
+    def test_arm_ast2600_otp_blockdev_device(self):
+        self.vm.set_machine("ast2600-evb")
+
+        image_path = self.archive_extract(self.ASSET_SDK_V907_AST2600)
+        otp_img = self.generate_otpmem_image()
+
+        self.vm.set_console()
+        self.vm.add_args(
+            "-blockdev", f"driver=file,filename={otp_img},node-name=otp",
+            "-global", "aspeed-otp.drive=otp",
+        )
+        self.do_test_arm_aspeed_sdk_start(
+            self.scratch_file("ast2600-default", "image-bmc"))
+        self.wait_for_console_pattern("ast2600-default login:")
+
 if __name__ == '__main__':
     AspeedTest.main()