From: Jamin Lin <jamin_lin@aspeedtech.com>
To: "Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Kane Chen" <kane_chen@aspeedtech.com>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
"open list:All patches CC here" <qemu-devel@nongnu.org>
Cc: Jamin Lin <jamin_lin@aspeedtech.com>, Troy Lee <troy_lee@aspeedtech.com>
Subject: [PATCH v3 12/12] tests/functional/arm/test_aspeed_ast1030: Test the usbredir server transport
Date: Tue, 10 Nov 2026 08:29:31 +0000 [thread overview]
Message-ID: <20261110082917.240329-13-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20261110082917.240329-1-jamin_lin@aspeedtech.com>
Export the AST1030 UDC gadget with x-usb-redir-server and import it on an
AST2600 with usb-redir, then check that the AST2600 enumerates it. That
covers the announce, control and enumeration paths of the transport, and
the UDC model behind it.
The two machines have to come from the same QEMU binary, because a
functional test gets only one. ast1030-evb and ast2600-evb are both in
qemu-system-arm.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
tests/functional/arm/test_aspeed_ast1030.py | 51 +++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/tests/functional/arm/test_aspeed_ast1030.py b/tests/functional/arm/test_aspeed_ast1030.py
index 83a96ec322..57d1233b6d 100755
--- a/tests/functional/arm/test_aspeed_ast1030.py
+++ b/tests/functional/arm/test_aspeed_ast1030.py
@@ -6,6 +6,8 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
+import os
+
from aspeed import AspeedTest
from qemu_test import Asset, exec_command_and_wait_for_pattern
@@ -68,6 +70,55 @@ def test_arm_ast1030_zephyros_1_07(self):
'kernel uptime',
]: exec_command_and_wait_for_pattern(self, shell_cmd, "uart:~$")
+ ASSET_SDK_V1103_AST2600 = Asset(
+ 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v11.03/ast2600-default-image.tar.gz',
+ '47e3656a14bf7a4de28d3dfbf48bc2325443bc42d270f3bc82646f92f6dea165')
+
+ def test_arm_ast1030_usbredir_to_ast2600(self):
+ self.require_device('x-usb-redir-server')
+ self.require_device('usb-redir')
+ self.set_machine('ast2600-evb')
+ self.set_machine('ast1030-evb')
+
+ ast1030_kernel_file = self.archive_extract(
+ self.ASSET_ZEPHYR_3_08, member="ast1030-evb-demo/zephyr.elf")
+
+ ast2600_image_file = self.archive_extract(
+ self.ASSET_SDK_V1103_AST2600,
+ member="ast2600-default-image/image-bmc")
+ sock = os.path.join(self.socket_dir().name, 'usbredir.sock')
+
+ udc = self.get_vm(name='udc')
+ udc.set_console()
+ udc.add_args('-kernel', ast1030_kernel_file, '-nographic',
+ '-chardev',
+ f'socket,id=usbredir0,path={sock},server=on,wait=off',
+ '-device',
+ 'x-usb-redir-server,id=udcredir,chardev=usbredir0',
+ '-device', 'aspeed.udc-gadget,bus=udcredir.0,'
+ 'udc=/machine/soc/udc')
+ udc.launch()
+ self.wait_for_console_pattern('Booting Zephyr OS', vm=udc)
+ exec_command_and_wait_for_pattern(self, 'usb enable', 'cmd_usb_enable',
+ vm=udc)
+ self.wait_for_console_pattern('uart:~$', vm=udc)
+
+ host = self.get_vm(name='host')
+ host.set_machine('ast2600-evb')
+ host.set_console()
+ host.add_args('-drive',
+ f'file={ast2600_image_file},if=mtd,format=raw',
+ '-snapshot',
+ '-chardev', f'socket,id=usbredir0,path={sock}',
+ '-device', 'usb-redir,chardev=usbredir0,bus=usb-bus.1')
+ host.launch()
+ self.wait_for_console_pattern('U-Boot 2019.04', vm=host)
+ self.wait_for_console_pattern('Hit any key to stop autoboot', vm=host)
+ exec_command_and_wait_for_pattern(self, '\012', 'ast#', vm=host)
+ exec_command_and_wait_for_pattern(self, 'usb start', 'ast#', vm=host)
+ exec_command_and_wait_for_pattern(self, 'usb tree',
+ 'ZEPHYR Zephyr DFU sample', vm=host)
+
def test_arm_ast1030_otp_blockdev_device(self):
self.vm.set_machine("ast1030-evb")
--
2.43.0
prev parent reply other threads:[~2026-11-10 8:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 8:29 [PATCH v3 00/12] hw/usb/aspeed-udc: Add AST1030 UDC support Jamin Lin
2026-11-10 8:29 ` [PATCH v3 01/12] hw/usb/aspeed-udc: Make the SETUP buffer byte addressable Jamin Lin
2026-11-10 8:29 ` [PATCH v3 02/12] hw/usb/aspeed-udc: Finish an EP0 IN transfer at the status stage Jamin Lin
2026-11-10 8:29 ` [PATCH v3 03/12] hw/usb/aspeed-udc: Mask the reserved bits on register writes Jamin Lin
2026-11-10 8:29 ` [PATCH v3 04/12] hw/usb/aspeed-udc: Clear EP_POOL_ACK when no endpoint ack is left Jamin Lin
2026-11-10 8:29 ` [PATCH v3 05/12] hw/usb/aspeed-udc: Rename the transfer helpers after their DMA mode Jamin Lin
2026-11-10 8:29 ` [PATCH v3 06/12] hw/usb/aspeed-udc: Store the EP_DMA_STS write first Jamin Lin
2026-11-10 8:29 ` [PATCH v3 07/12] hw/usb/aspeed-udc: Pick the EP_DMA_STS path by direction Jamin Lin
2026-11-10 8:29 ` [PATCH v3 08/12] hw/usb/aspeed-udc: Support single-stage IN transfers Jamin Lin
2026-11-10 8:29 ` [PATCH v3 09/12] hw/usb/aspeed-udc: Use the endpoint max packet size for OUT transfers Jamin Lin
2026-11-10 8:29 ` [PATCH v3 10/12] hw/usb/aspeed-udc: Add trace events for the transfer paths Jamin Lin
2026-11-10 8:29 ` [PATCH v3 11/12] hw/arm/aspeed_ast10x0: Add the USB device controller Jamin Lin
2026-11-10 8:29 ` Jamin Lin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110082917.240329-13-jamin_lin@aspeedtech.com \
--to=jamin_lin@aspeedtech.com \
--cc=clg@kaod.org \
--cc=kane_chen@aspeedtech.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=troy_lee@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.