Mailing List Archive

[xen master] automation: Add a gzip compressed kernel image test on arm32
commit d28b226244abcb4b32e07de52df96b6b1686a240
Author: Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Feb 14 16:38:41 2023 +0100
Commit: Stefano Stabellini <stefano.stabellini@amd.com>
CommitDate: Wed Feb 15 13:46:12 2023 -0800

automation: Add a gzip compressed kernel image test on arm32

Xen supports booting gzip compressed kernels, therefore add a new test
job qemu-smoke-dom0less-arm32-gcc-gzip in debug and non-debug variant
that will execute qemu-smoke-dom0less-arm32.sh script to test booting
a domU with a gzip compressed kernel image (in our case zImage).

By passing "gzip" as a test variant, the test will call gzip command
to compress kernel image and use it in ImageBuilder configuration for
domU1. No need for a specific check to be executed from domU. Being able
to see a test message from a boot log is sufficient to mark a test as
passed.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
automation/gitlab-ci/test.yaml | 16 ++++++++++++++++
automation/scripts/qemu-smoke-dom0less-arm32.sh | 13 +++++++++++++
2 files changed, 29 insertions(+)

diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index c2bcc5d4d3..be7a55d897 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -242,6 +242,22 @@ qemu-smoke-dom0less-arm32-gcc-debug-staticmem:
- *arm32-test-needs
- debian-unstable-gcc-arm32-debug-staticmem

+qemu-smoke-dom0less-arm32-gcc-gzip:
+ extends: .qemu-arm32
+ script:
+ - ./automation/scripts/qemu-smoke-dom0less-arm32.sh gzip 2>&1 | tee ${LOGFILE}
+ needs:
+ - *arm32-test-needs
+ - debian-unstable-gcc-arm32
+
+qemu-smoke-dom0less-arm32-gcc-debug-gzip:
+ extends: .qemu-arm32
+ script:
+ - ./automation/scripts/qemu-smoke-dom0less-arm32.sh gzip 2>&1 | tee ${LOGFILE}
+ needs:
+ - *arm32-test-needs
+ - debian-unstable-gcc-arm32-debug
+
qemu-alpine-x86_64-gcc:
extends: .qemu-x86-64
script:
diff --git a/automation/scripts/qemu-smoke-dom0less-arm32.sh b/automation/scripts/qemu-smoke-dom0less-arm32.sh
index bd89a3f8b4..c2e331451d 100755
--- a/automation/scripts/qemu-smoke-dom0less-arm32.sh
+++ b/automation/scripts/qemu-smoke-dom0less-arm32.sh
@@ -33,6 +33,15 @@ fi
"
fi

+if [[ "${test_variant}" == "gzip" ]]; then
+ # Compress kernel image with gzip (keep unmodified one for dom0)
+ gzip -k vmlinuz
+ passed="${test_variant} test passed"
+ domU_check="
+echo \"${passed}\"
+"
+fi
+
# dom0/domU rootfs
# We are using the same rootfs for dom0 and domU. The only difference is
# that for the former, we set explictly rdinit to /bin/sh, whereas for the
@@ -89,6 +98,10 @@ if [[ "${test_variant}" == "static-mem" ]]; then
echo -e "\nDOMU_STATIC_MEM[0]=\"${domu_base} ${domu_size}\"" >> config
fi

+if [[ "${test_variant}" == "gzip" ]]; then
+ sed -i 's/DOMU_KERNEL\[0\]=.*/DOMU_KERNEL\[0\]="vmlinuz.gz"/' config
+fi
+
rm -rf imagebuilder
git clone https://gitlab.com/ViryaOS/imagebuilder
bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config
--
generated by git-patchbot for /home/xen/git/xen.git#master