@samitouri / QOSamiQemu / commits / adbe612295

tests/functional/aarch64/test_aspeed: Disable kernel crypto self-tests in AST2700 boot tests

Disable the kernel crypto self-tests in the AST2700 functional tests by appending "cryptomgr.notests=1" to the U-Boot bootargs before booting the kernel. The ASPEED SDK enables crypto self-tests during kernel startup to validate the hardware crypto engine. However, the current QEMU implementation of the AST2700 HACE/crypto engine is still incomplete. As a result, the kernel crypto self-tests trigger multiple warnings during boot when running under QEMU. Typical examples observed in the kernel log include failures for several cipher modes such as DES/TDES/AES in ECB/CBC/CTR modes: alg: self-tests for ctr(des) using aspeed-ctr-des failed (rc=-22) alg: self-tests for ecb(des3_ede) using aspeed-ecb-tdes failed (rc=-22) alg: self-tests for cbc(aes) using aspeed-cbc-aes failed (rc=-22) ... To reduce noise in the functional test logs, the tests now append the following parameter to the kernel bootargs: cryptomgr.notests=1 This disables the kernel crypto self-tests when running the functional tests under QEMU. For validating the HACE implementation, we should instead rely on the dedicated QEMU unit tests located in: tests/qtest/ast2700-hace-test.c Once the QEMU implementation of the ASPEED HACE/crypto model has progressed further and supports the missing crypto modes, we can reassess whether enabling the kernel crypto self-tests again in the functional tests is appropriate. 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/20260316081549.1279841-1-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>

Jamin Lin committed Mar 16, 2026 at 08:15 UTC adbe6122951627b3fd01dacfafb04af3322e789d
3 files changed +25 -6
tests/functional/aarch64/test_aspeed_ast2700a1.py
+9 -2
@@ -51,9 +51,11 @@ class AST2x00MachineSDK(QemuSystemTest):
51 wait_for_console_pattern(self, 'pass')
52 wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-A)')
53
54 + def disable_kernel_crypto_selftest(self):
55 + exec_command_and_wait_for_pattern(self,
56 + 'setenv bootargs "${bootargs} cryptomgr.notests=1"', '=>')
57 +
58 def enable_ast2700_pcie2(self):
55 - wait_for_console_pattern(self, 'Hit any key to stop autoboot')
56 - exec_command_and_wait_for_pattern(self, '\012', '=>')
59 exec_command_and_wait_for_pattern(self,
60 'cp 100420000 403000000 900000', '=>')
61 exec_command_and_wait_for_pattern(self,
@@ -67,8 +69,13 @@ class AST2x00MachineSDK(QemuSystemTest):
69
70 def verify_openbmc_boot_start(self, enable_pcie=True):
71 wait_for_console_pattern(self, 'U-Boot 2023.10')
72 + wait_for_console_pattern(self, 'Hit any key to stop autoboot')
73 + exec_command_and_wait_for_pattern(self, '\012', '=>')
74 + self.disable_kernel_crypto_selftest()
75 if enable_pcie:
76 self.enable_ast2700_pcie2()
77 + else:
78 + exec_command(self, 'boot')
79 wait_for_console_pattern(self, 'Linux version ')
80
81 def verify_openbmc_boot_and_login(self, name, enable_pcie=True):
tests/functional/aarch64/test_aspeed_ast2700a2.py
+9 -2
@@ -51,9 +51,11 @@ class AST2x00MachineSDK(QemuSystemTest):
51 wait_for_console_pattern(self, 'pass')
52 wait_for_console_pattern(self, 'Jumping to BL31 (Trusted Firmware-A)')
53
54 + def disable_kernel_crypto_selftest(self):
55 + exec_command_and_wait_for_pattern(self,
56 + 'setenv bootargs "${bootargs} cryptomgr.notests=1"', '=>')
57 +
58 def enable_ast2700_pcie2(self):
55 - wait_for_console_pattern(self, 'Hit any key to stop autoboot')
56 - exec_command_and_wait_for_pattern(self, '\012', '=>')
59 exec_command_and_wait_for_pattern(self,
60 'cp 100420000 403000000 900000', '=>')
61 exec_command_and_wait_for_pattern(self,
@@ -67,8 +69,13 @@ class AST2x00MachineSDK(QemuSystemTest):
69
70 def verify_openbmc_boot_start(self, enable_pcie=True):
71 wait_for_console_pattern(self, 'U-Boot 2023.10')
72 + wait_for_console_pattern(self, 'Hit any key to stop autoboot')
73 + exec_command_and_wait_for_pattern(self, '\012', '=>')
74 + self.disable_kernel_crypto_selftest()
75 if enable_pcie:
76 self.enable_ast2700_pcie2()
77 + else:
78 + exec_command(self, 'boot')
79 wait_for_console_pattern(self, 'Linux version ')
80
81 def verify_openbmc_boot_and_login(self, name, enable_pcie=True):
tests/functional/aarch64/test_aspeed_ast2700fc.py
+7 -2
@@ -27,9 +27,11 @@ class AST2x00MachineSDK(QemuSystemTest):
27
28 self.vm.launch()
29
30 + def disable_kernel_crypto_selftest(self):
31 + exec_command_and_wait_for_pattern(self,
32 + 'setenv bootargs "${bootargs} cryptomgr.notests=1"', '=>')
33 +
34 def enable_ast2700_pcie2(self):
31 - wait_for_console_pattern(self, 'Hit any key to stop autoboot')
32 - exec_command_and_wait_for_pattern(self, '\012', '=>')
35 exec_command_and_wait_for_pattern(self,
36 'cp 100420000 403000000 900000', '=>')
37 exec_command_and_wait_for_pattern(self,
@@ -43,6 +45,9 @@ class AST2x00MachineSDK(QemuSystemTest):
45
46 def verify_openbmc_boot_and_login(self, name):
47 wait_for_console_pattern(self, 'U-Boot 2023.10')
48 + wait_for_console_pattern(self, 'Hit any key to stop autoboot')
49 + exec_command_and_wait_for_pattern(self, '\012', '=>')
50 + self.disable_kernel_crypto_selftest()
51 self.enable_ast2700_pcie2()
52 wait_for_console_pattern(self, 'Starting kernel ...')
53