[PATCH v1 3/3] tests/functional/arm: Add AST2600 boot test with generated OTP image

Kane Chen via posted 3 patches 1 week, 5 days 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>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>
There is a newer version of this series
[PATCH v1 3/3] tests/functional/arm: Add AST2600 boot test with generated OTP image
Posted by Kane Chen via 1 week, 5 days ago
From: Kane-Chen-AS <kane_chen@aspeedtech.com>

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>
---
 tests/functional/arm/test_aspeed_ast2600.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/functional/arm/test_aspeed_ast2600.py b/tests/functional/arm/test_aspeed_ast2600.py
index 129695ca4e..1813601fcb 100755
--- a/tests/functional/arm/test_aspeed_ast2600.py
+++ b/tests/functional/arm/test_aspeed_ast2600.py
@@ -136,5 +136,19 @@ def test_arm_ast2600_evb_sdk(self):
         exec_command_and_wait_for_pattern(self,
              '/sbin/hwclock -f /dev/rtc1', year)
 
+    def test_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()
-- 
2.43.0
Re: [SPAM] [PATCH v1 3/3] tests/functional/arm: Add AST2600 boot test with generated OTP image
Posted by Cédric Le Goater 1 week, 5 days ago
On 9/16/25 10:04, Kane Chen wrote:
> From: Kane-Chen-AS <kane_chen@aspeedtech.com>
> 
> 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>
> ---
>   tests/functional/arm/test_aspeed_ast2600.py | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
> 
> diff --git a/tests/functional/arm/test_aspeed_ast2600.py b/tests/functional/arm/test_aspeed_ast2600.py
> index 129695ca4e..1813601fcb 100755
> --- a/tests/functional/arm/test_aspeed_ast2600.py
> +++ b/tests/functional/arm/test_aspeed_ast2600.py
> @@ -136,5 +136,19 @@ def test_arm_ast2600_evb_sdk(self):
>           exec_command_and_wait_for_pattern(self,
>                '/sbin/hwclock -f /dev/rtc1', year)
>   
> +    def test_ast2600_otp_blockdev_device(self):

please use a test_arm_ prefix.


Thanks,

C.



> +        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()
RE: [SPAM] [PATCH v1 3/3] tests/functional/arm: Add AST2600 boot test with generated OTP image
Posted by Kane Chen 1 week, 4 days ago
Hi Cédric,

Thanks for the review and feedback. I’ll send a v2 addressing these comments.

Best Regards,
Kane
> -----Original Message-----
> From: Cédric Le Goater <clg@kaod.org>
> Sent: Tuesday, September 16, 2025 11:58 PM
> To: Kane Chen <kane_chen@aspeedtech.com>; Peter Maydell
> <peter.maydell@linaro.org>; Steven Lee <steven_lee@aspeedtech.com>; Troy
> Lee <leetroy@gmail.com>; Jamin Lin <jamin_lin@aspeedtech.com>; Andrew
> Jeffery <andrew@codeconstruct.com.au>; Joel Stanley <joel@jms.id.au>;
> open list:ASPEED BMCs <qemu-arm@nongnu.org>; open list:All patches CC
> here <qemu-devel@nongnu.org>
> Cc: Troy Lee <troy_lee@aspeedtech.com>; thuth@redhat.com
> Subject: Re: [SPAM] [PATCH v1 3/3] tests/functional/arm: Add AST2600 boot
> test with generated OTP image
> 
> On 9/16/25 10:04, Kane Chen wrote:
> > From: Kane-Chen-AS <kane_chen@aspeedtech.com>
> >
> > 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>
> > ---
> >   tests/functional/arm/test_aspeed_ast2600.py | 14 ++++++++++++++
> >   1 file changed, 14 insertions(+)
> >
> > diff --git a/tests/functional/arm/test_aspeed_ast2600.py
> > b/tests/functional/arm/test_aspeed_ast2600.py
> > index 129695ca4e..1813601fcb 100755
> > --- a/tests/functional/arm/test_aspeed_ast2600.py
> > +++ b/tests/functional/arm/test_aspeed_ast2600.py
> > @@ -136,5 +136,19 @@ def test_arm_ast2600_evb_sdk(self):
> >           exec_command_and_wait_for_pattern(self,
> >                '/sbin/hwclock -f /dev/rtc1', year)
> >
> > +    def test_ast2600_otp_blockdev_device(self):
> 
> please use a test_arm_ prefix.
> 
> 
> Thanks,
> 
> C.
> 
> 
> 
> > +        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()