[PATCH v7 21/22] tests/functional/arm/test_aspeed_ast2600_sdk: Add i3c functional test

Jamin Lin
2026-02-25T02:14:44Z

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
tests/functional/arm/test_aspeed_ast2600_sdk.py | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/tests/functional/arm/test_aspeed_ast2600_sdk.py b/tests/functional/arm/test_aspeed_ast2600_sdk.py
index 971fa3390d..46b9f7058c 100755
--- a/tests/functional/arm/test_aspeed_ast2600_sdk.py
+++ b/tests/functional/arm/test_aspeed_ast2600_sdk.py
@@ -31,6 +31,15 @@ def do_ast2600_pcie_test(self):
'ip addr show dev eth4',
'inet 10.0.2.15/24')

+ def do_ast2600_i3c_test(self):
+ exec_command_and_wait_for_pattern(self,
+ 'i3ctransfer -d /dev/bus/i3c/5-1234567890ab'
+ ' -w 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef',
+ 'Success on message 0')
+ exec_command_and_wait_for_pattern(self,
+ 'i3ctransfer -d /dev/bus/i3c/5-1234567890ab -r 8 | grep 0x | xargs',
+ '0x12 0x34 0x56 0x78 0x90 0xab 0xcd 0xef')
+
def test_arm_ast2600_evb_sdk(self):
self.set_machine('ast2600-evb')
self.require_netdev('user')
@@ -43,6 +52,8 @@ def test_arm_ast2600_evb_sdk(self):
'ds1338,bus=aspeed.i2c.bus.5,address=0x32')
self.vm.add_args('-device', 'e1000e,netdev=net1,bus=pcie.0')
self.vm.add_args('-netdev', 'user,id=net1')
+ self.vm.add_args('-device',
+ 'mock-i3c-target,bus=dw.i3c.5,pid=0xab9078563412')
self.do_test_arm_aspeed_sdk_start(
self.scratch_file("ast2600-default", "image-bmc"))

@@ -69,6 +80,7 @@ def test_arm_ast2600_evb_sdk(self):
exec_command_and_wait_for_pattern(self,
'/sbin/hwclock -f /dev/rtc1', year)
self.do_ast2600_pcie_test()
+ self.do_ast2600_i3c_test()

if __name__ == '__main__':
--
2.43.0