From d68dea45f1b6aa2ec2ec7c89021644f9e6ef7e46 Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Tue, 10 Jun 2025 08:06:19 +0200 Subject: [PATCH] ci: add emulated USB devices for lsusb profile test With this lsusb sees a non-empty emulated bus and the test is successful. ``` zyga@x13:~/apparmor$ spread garden:ubuntu-cloud-24.04:tests/profiles/lsusb 2025-06-10 08:01:13 Project content is packed for delivery (6.93MB). 2025-06-10 08:01:13 If killed, discard servers with: spread -reuse-pid=290633 -discard 2025-06-10 08:01:13 Allocating garden:ubuntu-cloud-24.04... 2025-06-10 08:03:25 Waiting for garden:ubuntu-cloud-24.04 to make SSH available at localhost:5000... 2025-06-10 08:03:25 Allocated garden:ubuntu-cloud-24.04. 2025-06-10 08:03:25 Connecting to garden:ubuntu-cloud-24.04... 2025-06-10 08:03:32 Connected to garden:ubuntu-cloud-24.04 at localhost:5000. 2025-06-10 08:03:32 Sending project content to garden:ubuntu-cloud-24.04... 2025-06-10 08:03:34 Preparing garden:ubuntu-cloud-24.04 (garden:ubuntu-cloud-24.04)... 2025-06-10 08:04:26 Preparing garden:ubuntu-cloud-24.04:tests/profiles/lsusb (garden:ubuntu-cloud-24.04)... 2025-06-10 08:04:26 Executing garden:ubuntu-cloud-24.04:tests/profiles/lsusb (garden:ubuntu-cloud-24.04) (1/1)... 2025-06-10 08:04:26 Restoring garden:ubuntu-cloud-24.04:tests/profiles/lsusb (garden:ubuntu-cloud-24.04)... 2025-06-10 08:04:26 Discarding garden:ubuntu-cloud-24.04... 2025-06-10 08:04:27 Successful tasks: 1 2025-06-10 08:04:27 Aborted tasks: 0 ``` Signed-off-by: Zygmunt Krynicki --- spread.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spread.yaml b/spread.yaml index b278f6400..eeee192bc 100644 --- a/spread.yaml +++ b/spread.yaml @@ -41,12 +41,14 @@ backends: # to the Ubuntu cloud images that have the rootfs as the first # partition. exec image-garden allocate "$SPREAD_SYSTEM"."$ARCH" \ + -usb -usbdevice keyboard -usbdevice mouse \ -kernel bzImage \ -append 'root=/dev/sda1 ro console=tty1 console=ttyS0' fi # Ask image garden to allocate the system and relay the result back # to spread as either success of failure. - exec image-garden allocate "$SPREAD_SYSTEM"."$ARCH" + exec image-garden allocate "$SPREAD_SYSTEM"."$ARCH" \ + -usb -usbdevice keyboard -usbdevice mouse \ discard: | # See above for an explanation. if [ -n "${SPREAD_HOST_PATH-}" ]; then