[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/2] gitlab-ci: add an ARM32 qemu-based smoke test



Hi,

On 20/03/2022 01:46, Stefano Stabellini wrote:
On Fri, 18 Mar 2022, Stefano Stabellini wrote:
Add a minimal ARM32 smoke test based on qemu-system-arm, as provided by
the test-artifacts qemu container. The minimal test simply boots Xen
(built from previous build stages) and Dom0. The test is fetching the
Dom0 kernel and initrd from Debian Jessie: they work just fine and this
way we don't have to maintain a build for them too.


Thanks to the Xen fix recently submitted
(https://marc.info/?l=xen-devel&m=164774063802402) I'll be able to
update this script to use Debian Bullseye. I am thinking of merging the
below directly with this patch.


---

automation: upgrade Debian to Bullseye for testing Xen aarch32

Also change initrd. As the new netboot initrd from Debian Bullseye is
huge (22MB), use a tiny initrd from Alpine Linux instead (only 2.5MB).

This is sounds odd to me. So we are going to use Bullseye but not really because we want to use a different initrd.

Why can't you get everything from the same place?


Also note that the huge Debian Bullseye initrd would cause QEMU to
crash due to the -device loader parameter.

Can you provide more details? Was this reported to QEMU?


Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>

diff --git a/automation/scripts/qemu-smoke-arm32.sh 
b/automation/scripts/qemu-smoke-arm32.sh
index 162922ace5..d554de7939 100755
--- a/automation/scripts/qemu-smoke-arm32.sh
+++ b/automation/scripts/qemu-smoke-arm32.sh
@@ -5,11 +5,20 @@ set -ex
  export DEBIAN_FRONTENT=noninteractive
  apt-get -qy update
  apt-get -qy install --no-install-recommends device-tree-compiler \
-                                            curl
+                                            curl \
+                                            cpio
cd binaries
-curl --fail --silent --show-error --location --output vmlinuz 
http://http.us.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/vmlinuz
-curl --fail --silent --show-error --location --output initrd.gz 
http://http.us.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/initrd.gz
+# Use the kernel from Debian
+curl --fail --silent --show-error --location --output vmlinuz 
http://http.us.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/vmlinuz
+# Use a tiny initrd based on busybox from Alpine Linux
+curl --fail --silent --show-error --location --output initrd.tar.gz 
https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armhf/alpine-minirootfs-3.15.1-armhf.tar.gz
+
+mkdir rootfs
+cd rootfs
+tar xvzf ../initrd.tar.gz
+find . | cpio -H newc -o | gzip > ../initrd.gz
+cd ..
kernel=`stat -L --printf="%s" vmlinuz`
  initrd=`stat -L --printf="%s" initrd.gz`
@@ -68,5 +77,5 @@ timeout -k 1 240 \
     -device loader,file=./initrd.gz,addr=0x3200000 |& tee smoke.serial
set -e
-(grep -q "^BusyBox" smoke.serial) || exit 1
+(grep -q "^/ #" smoke.serial) || exit 1
  exit 0


Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.