automation: dom0less arm32 testing
v2 cover automation: dom0less arm32 testing
This patch series aims at improving the arm32 CI testing by introducing the dom0less-based tests. It creates a foundation for further test expansion. This is particularly important now, when OSSTEST arm32 stuff is down and we need to have at least some coverage in gitlab CI.
Note:
First patch is added to the series for convenience. It switches the arm32 cross builds to be executed on arm64 instead of x86, as the latter has a lot less resources resulting in slowing down the whole pipeline.
CI pipeline performed on top of this series + cppcheck patch:
https://gitlab.com/xen-project/people/morzel/xen-orzelmichal/-/pipelines/777181033
Michal Orzel (5):
automation: Switch arm32 cross builds to run on arm64
automation: Add arm32 dom0less testing
automation: Add a static memory allocation test on arm32
automation: Add a gzip compressed kernel image test on arm32
automation: Add a true dom0less test on arm32
... => unstable-arm64v8-arm32-gcc.dockerfile} | 3 +-
automation/gitlab-ci/build.yaml | 30 +++-
automation/gitlab-ci/test.yaml | 64 ++++++++
.../scripts/qemu-smoke-dom0less-arm32.sh | 142 ++++++++++++++++++
4 files changed, 232 insertions(+), 7 deletions(-)
rename automation/build/debian/{unstable-arm32-gcc.dockerfile => unstable-arm64v8-arm32-gcc.dockerfile} (94%)
create mode 100755 automation/scripts/qemu-smoke-dom0less-arm32.shSignature · 1 line
2.25.1
PATCH v2 1/5 automation: Switch arm32 cross builds to run on arm64
Due to the limited x86 CI resources slowing down the whole pipeline, switch the arm32 cross builds to be executed on arm64 which is much more capable. For that, rename the existing debian container dockerfile from unstable-arm32-gcc to unstable-arm64v8-arm32-gcc and use arm64v8/debian:unstable as an image. Note, that we cannot use the same container name as we have to keep the backwards compatibility. Take the opportunity to remove extra empty line at the end of a file.
Modify the tag of .arm32-cross-build-tmpl to arm64 and update the build jobs accordingly.
---
Changes in v2:
- new patch
For convenience and own testing, I built and pushed the new container to registry.
---
...ockerfile => unstable-arm64v8-arm32-gcc.dockerfile} | 3 +--
automation/gitlab-ci/build.yaml | 10 +++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
rename automation/build/debian/{unstable-arm32-gcc.dockerfile => unstable-arm64v8-arm32-gcc.dockerfile} (94%)automation/build/debian/unstable-arm64v8-arm32-gcc.dockerfile renamed from automation/build/debian/unstable-arm32-gcc.dockerfile +1 -2
@@ -1,4 +1,4 @@ -FROM debian:unstable +FROM arm64v8/debian:unstable LABEL maintainer.name="The Xen Project" \ maintainer.email="[email protected]"
@@ -21,4 +21,3 @@ RUN apt-get update && \ apt-get autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* -
automation/gitlab-ci/build.yaml +5 -5
@@ -123,7 +123,7 @@ variables: XEN_TARGET_ARCH: arm32 tags: - - x86_64 + - arm64 .arm32-cross-build: extends: .arm32-cross-build-tmpl
@@ -542,26 +542,26 @@ alpine-3.12-clang-debug: debian-unstable-gcc-arm32: extends: .gcc-arm32-cross-build variables: - CONTAINER: debian:unstable-arm32-gcc + CONTAINER: debian:unstable-arm64v8-arm32-gcc HYPERVISOR_ONLY: y debian-unstable-gcc-arm32-debug: extends: .gcc-arm32-cross-build-debug variables: - CONTAINER: debian:unstable-arm32-gcc + CONTAINER: debian:unstable-arm64v8-arm32-gcc HYPERVISOR_ONLY: y debian-unstable-gcc-arm32-randconfig: extends: .gcc-arm32-cross-build variables: - CONTAINER: debian:unstable-arm32-gcc + CONTAINER: debian:unstable-arm64v8-arm32-gcc HYPERVISOR_ONLY: y RANDCONFIG: y debian-unstable-gcc-arm32-debug-randconfig: extends: .gcc-arm32-cross-build-debug variables: - CONTAINER: debian:unstable-arm32-gcc + CONTAINER: debian:unstable-arm64v8-arm32-gcc HYPERVISOR_ONLY: y RANDCONFIG: y
Signature · 1 line
2.25.1
Re: [PATCH v2 1/5] automation: Switch arm32 cross builds to run on arm64
Quoted 8 lines · Michal Orzel
Due to the limited x86 CI resources slowing down the whole pipeline, switch the arm32 cross builds to be executed on arm64 which is much more capable. For that, rename the existing debian container dockerfile from unstable-arm32-gcc to unstable-arm64v8-arm32-gcc and use arm64v8/debian:unstable as an image. Note, that we cannot use the same container name as we have to keep the backwards compatibility. Take the opportunity to remove extra empty line at the end of a file.
Quoted 4 lines
Modify the tag of .arm32-cross-build-tmpl to arm64 and update the build jobs accordingly.
Signed-off-by Michal Orzel <[email protected]>
Quoted 6 lines
---
Changes in v2:
- new patchFor convenience and own testing, I built and pushed the new container to registry.
Thanks!
Quoted 71 lines
--- ...ockerfile => unstable-arm64v8-arm32-gcc.dockerfile} | 3 +-- automation/gitlab-ci/build.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) rename automation/build/debian/{unstable-arm32-gcc.dockerfile => unstable-arm64v8-arm32-gcc.dockerfile} (94%)automation/build/debian/unstable-arm64v8-arm32-gcc.dockerfile renamed from automation/build/debian/unstable-arm32-gcc.dockerfile +1
-2@@ -1,4 +1,4 @@ -FROM debian:unstable +FROM arm64v8/debian:unstable LABEL maintainer.name="The Xen Project" \ maintainer.email="[email protected]"@@ -21,4 +21,3 @@ RUN apt-get update && \ apt-get autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* -automation/gitlab-ci/build.yaml +5
-5@@ -123,7 +123,7 @@ variables: XEN_TARGET_ARCH: arm32 tags: - - x86_64 + - arm64 .arm32-cross-build: extends: .arm32-cross-build-tmpl@@ -542,26 +542,26 @@ alpine-3.12-clang-debug: debian-unstable-gcc-arm32: extends: .gcc-arm32-cross-build variables: - CONTAINER: debian:unstable-arm32-gcc + CONTAINER: debian:unstable-arm64v8-arm32-gcc HYPERVISOR_ONLY: y debian-unstable-gcc-arm32-debug: extends: .gcc-arm32-cross-build-debug variables: - CONTAINER: debian:unstable-arm32-gcc + CONTAINER: debian:unstable-arm64v8-arm32-gcc HYPERVISOR_ONLY: y debian-unstable-gcc-arm32-randconfig: extends: .gcc-arm32-cross-build variables: - CONTAINER: debian:unstable-arm32-gcc + CONTAINER: debian:unstable-arm64v8-arm32-gcc HYPERVISOR_ONLY: y RANDCONFIG: y debian-unstable-gcc-arm32-debug-randconfig: extends: .gcc-arm32-cross-build-debug variables: - CONTAINER: debian:unstable-arm32-gcc + CONTAINER: debian:unstable-arm64v8-arm32-gcc HYPERVISOR_ONLY: y RANDCONFIG: ySignature · 1 line
2.25.1
PATCH v2 2/5 automation: Add arm32 dom0less testing
In reply to Michal OrzelAt the moment, we only perform a single arm32 test in our CI, checking whether dom0 boots successfully or not. This is mostly because we do not have any arm32 runners and we only execute a hypervisor only build.
In order not to leave the arm32 testing in such a poor state, add a script qemu-smoke-dom0less-arm32.sh to start testing dom0less configuration, while keeping dom0 to make the test more interesting.
The script is mostly based on the one used for dom0 arm32 testing as well as the one used for dom0less arm64 testing. We obtain Debian Bullseye kernel and Alpine Linux busybox-based rootfs. Depending on the test variant, we prepare a test case contained within domU_check variable, that will be executed as part of /init script from domU rootfs.
---
Changes in v2:
- keep dom0 around by default to make tests more interesting
--- automation/gitlab-ci/test.yaml | 16 +++ .../scripts/qemu-smoke-dom0less-arm32.sh | 99 +++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100755 automation/scripts/qemu-smoke-dom0less-arm32.sh
automation/gitlab-ci/test.yaml +16 -0
@@ -210,6 +210,22 @@ qemu-smoke-dom0-arm32-gcc-debug: - *arm32-test-needs - debian-unstable-gcc-arm32-debug +qemu-smoke-dom0less-arm32-gcc: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32 + +qemu-smoke-dom0less-arm32-gcc-debug: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32-debug + qemu-alpine-x86_64-gcc: extends: .qemu-x86-64 script:
automation/scripts/qemu-smoke-dom0less-arm32.sh new file +99 -0
99 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH v2 2/5] automation: Add arm32 dom0less testing
Quoted 8 lines · Michal Orzel
At the moment, we only perform a single arm32 test in our CI, checking whether dom0 boots successfully or not. This is mostly because we do not have any arm32 runners and we only execute a hypervisor only build.
In order not to leave the arm32 testing in such a poor state, add a script
qemu-smoke-dom0less-arm32.shto start testing dom0less configuration, while keeping dom0 to make the test more interesting.
Quoted 7 lines
The script is mostly based on the one used for dom0 arm32 testing as well as the one used for dom0less arm64 testing. We obtain Debian Bullseye kernel and Alpine Linux busybox-based rootfs. Depending on the test variant, we prepare a test case contained within
domU_checkvariable, that will be executed as part of /init script from domU rootfs.Signed-off-by Michal Orzel <[email protected]>
Quoted 144 lines
---
Changes in v2:
- keep dom0 around by default to make tests more interesting--- automation/gitlab-ci/test.yaml | 16 +++ .../scripts/qemu-smoke-dom0less-arm32.sh | 99 +++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100755 automation/scripts/qemu-smoke-dom0less-arm32.shautomation/gitlab-ci/test.yaml +16
-0@@ -210,6 +210,22 @@ qemu-smoke-dom0-arm32-gcc-debug: - *arm32-test-needs - debian-unstable-gcc-arm32-debug +qemu-smoke-dom0less-arm32-gcc: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32 + +qemu-smoke-dom0less-arm32-gcc-debug: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32-debug + qemu-alpine-x86_64-gcc: extends: .qemu-x86-64 script:automation/scripts/qemu-smoke-dom0less-arm32.sh new file +99
-0@@ -0,0 +1,99 @@ +#!/bin/bash + +set -ex + +test_variant=$1 + +# Prompt to grep for to check if dom0 booted successfully +dom0_prompt="^/ #" + +cd binaries +# Use the kernel from Debian +curl --fail --silent --show-error --location --output vmlinuz https://deb.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 + +if [ -z "${test_variant}" ]; then + passed="generic 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 +# latter we rely on using custom /init script with test case inside. +mkdir rootfs +cd rootfs +tar xvzf ../initrd.tar.gz +echo "#!/bin/sh + +mount -t proc proc /proc +mount -t sysfs sysfs /sys +mount -t devtmpfs devtmpfs /dev +${domU_check} +/bin/sh" > init +chmod +x init +find . | cpio -H newc -o | gzip > ../initrd.gz +cd .. + +# XXX QEMU looks for "efi-virtio.rom" even if it is unneeded +curl -fsSLO https://github.com/qemu/qemu/raw/v5.2.0/pc-bios/efi-virtio.rom +./qemu-system-arm \ + -machine virt \ + -machine virtualization=true \ + -smp 4 \ + -m 2048 \ + -serial stdio \ + -monitor none \ + -display none \ + -machine dumpdtb=virt.dtb + +# ImageBuilder +echo 'MEMORY_START="0x40000000" +MEMORY_END="0xC0000000" + +DEVICE_TREE="virt.dtb" +XEN="xen" +XEN_CMD="console=dtuart dom0_mem=512M bootscrub=0" + +DOM0_KERNEL="vmlinuz" +DOM0_RAMDISK="initrd.gz" +DOM0_CMD="console=hvc0 earlyprintk clk_ignore_unused root=/dev/ram0 rdinit=/bin/sh" + +DOMU_KERNEL[0]="vmlinuz" +DOMU_RAMDISK[0]="initrd.gz" +DOMU_MEM[0]="512" +NUM_DOMUS=1 + +LOAD_CMD="tftpb" +BOOT_CMD="bootm" +UBOOT_SOURCE="boot.source" +UBOOT_SCRIPT="boot.scr"' > config + +rm -rf imagebuilder +git clone https://gitlab.com/ViryaOS/imagebuilder +bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config + +# Run the test +rm -f smoke.serial +set +e +echo " virtio scan; dhcp; tftpb 0x40000000 boot.scr; source 0x40000000"| \ +timeout -k 1 240 \ +./qemu-system-arm \ + -machine virt \ + -machine virtualization=true \ + -smp 4 \ + -m 2048 \ + -serial stdio \ + -monitor none \ + -display none \ + -no-reboot \ + -device virtio-net-pci,netdev=n0 \ + -netdev user,id=n0,tftp=./ \ + -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee smoke.serial + +set -e +(grep -q "${dom0_prompt}" smoke.serial && grep -q "${passed}" smoke.serial) || exit 1 +exit 0Signature · 1 line
2.25.1
PATCH v2 3/5 automation: Add a static memory allocation test on arm32
In reply to Michal OrzelAdd a new test job qemu-smoke-dom0less-arm32-gcc-staticmem in debug and non-debug variant that will execute qemu-smoke-dom0less-arm32.sh script to test static memory allocation feature. The test case itself is directly taken from dom0less arm64 testing.
Populate build jobs to compile Xen with config options necessary to enable static memory feature. Populate test jobs passing "static-mem" as a test variant. The test configures domU with a static memory region (direct-mapped) and adds a check using /proc/iomem to determine the memory region marked as "System RAM".
---
Changes in v2:
- take into account new container for arm32 cross builds
- drop Rb as a result of code changes
--- automation/gitlab-ci/build.yaml | 20 +++++++++++++++++++ automation/gitlab-ci/test.yaml | 16 +++++++++++++++ .../scripts/qemu-smoke-dom0less-arm32.sh | 17 ++++++++++++++++ 3 files changed, 53 insertions(+)
automation/gitlab-ci/build.yaml +20 -0
@@ -565,6 +565,26 @@ debian-unstable-gcc-arm32-debug-randconfig: HYPERVISOR_ONLY: y RANDCONFIG: y +debian-unstable-gcc-arm32-staticmem: + extends: .gcc-arm32-cross-build + variables: + CONTAINER: debian:unstable-arm64v8-arm32-gcc + HYPERVISOR_ONLY: y + EXTRA_XEN_CONFIG: | + CONFIG_EXPERT=y + CONFIG_UNSUPPORTED=y + CONFIG_STATIC_MEMORY=y + +debian-unstable-gcc-arm32-debug-staticmem: + extends: .gcc-arm32-cross-build-debug + variables: + CONTAINER: debian:unstable-arm64v8-arm32-gcc + HYPERVISOR_ONLY: y + EXTRA_XEN_CONFIG: | + CONFIG_EXPERT=y + CONFIG_UNSUPPORTED=y + CONFIG_STATIC_MEMORY=y + # Arm builds debian-unstable-gcc-arm64:
automation/gitlab-ci/test.yaml +16 -0
@@ -226,6 +226,22 @@ qemu-smoke-dom0less-arm32-gcc-debug: - *arm32-test-needs - debian-unstable-gcc-arm32-debug +qemu-smoke-dom0less-arm32-gcc-staticmem: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh static-mem 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32-staticmem + +qemu-smoke-dom0less-arm32-gcc-debug-staticmem: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh static-mem 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32-debug-staticmem + qemu-alpine-x86_64-gcc: extends: .qemu-x86-64 script:
automation/scripts/qemu-smoke-dom0less-arm32.sh +17 -0
@@ -20,6 +20,19 @@ echo \"${passed}\" " fi +if [[ "${test_variant}" == "static-mem" ]]; then + # Memory range that is statically allocated to domU1 + domu_base="0x50000000" + domu_size="0x20000000" + passed="${test_variant} test passed" + domU_check=" +mem_range=$(printf \"%08x-%08x\" ${domu_base} $(( ${domu_base} + ${domu_size} - 1 ))) +if grep -q -x \"\${mem_range} : System RAM\" /proc/iomem; then + echo \"${passed}\" +fi +" +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
@@ -72,6 +85,10 @@ BOOT_CMD="bootm" UBOOT_SOURCE="boot.source" UBOOT_SCRIPT="boot.scr"' > config +if [[ "${test_variant}" == "static-mem" ]]; then + echo -e "\nDOMU_STATIC_MEM[0]=\"${domu_base} ${domu_size}\"" >> config +fi + rm -rf imagebuilder git clone https://gitlab.com/ViryaOS/imagebuilder bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config
Signature · 1 line
2.25.1
Re: [PATCH v2 3/5] automation: Add a static memory allocation test on arm32
Quoted 5 lines · Michal Orzel
Add a new test job qemu-smoke-dom0less-arm32-gcc-staticmem in debug and non-debug variant that will execute
qemu-smoke-dom0less-arm32.shscript to test static memory allocation feature. The test case itself is directly taken from dom0less arm64 testing.
Quoted 7 lines
Populate build jobs to compile Xen with config options necessary to enable static memory feature. Populate test jobs passing "static-mem" as a test variant. The test configures domU with a static memory region (direct-mapped) and adds a check using
/proc/iomemto determine the memory region marked as "System RAM".Signed-off-by Michal Orzel <[email protected]>
Quoted 106 lines
---
Changes in v2:
- take into account new container for arm32 cross builds
- drop Rb as a result of code changes--- automation/gitlab-ci/build.yaml | 20 +++++++++++++++++++ automation/gitlab-ci/test.yaml | 16 +++++++++++++++ .../scripts/qemu-smoke-dom0less-arm32.sh | 17 ++++++++++++++++ 3 files changed, 53 insertions(+)automation/gitlab-ci/build.yaml +20
-0@@ -565,6 +565,26 @@ debian-unstable-gcc-arm32-debug-randconfig: HYPERVISOR_ONLY: y RANDCONFIG: y +debian-unstable-gcc-arm32-staticmem: + extends: .gcc-arm32-cross-build + variables: + CONTAINER: debian:unstable-arm64v8-arm32-gcc + HYPERVISOR_ONLY: y + EXTRA_XEN_CONFIG: | + CONFIG_EXPERT=y + CONFIG_UNSUPPORTED=y + CONFIG_STATIC_MEMORY=y + +debian-unstable-gcc-arm32-debug-staticmem: + extends: .gcc-arm32-cross-build-debug + variables: + CONTAINER: debian:unstable-arm64v8-arm32-gcc + HYPERVISOR_ONLY: y + EXTRA_XEN_CONFIG: | + CONFIG_EXPERT=y + CONFIG_UNSUPPORTED=y + CONFIG_STATIC_MEMORY=y + # Arm builds debian-unstable-gcc-arm64:automation/gitlab-ci/test.yaml +16
-0@@ -226,6 +226,22 @@ qemu-smoke-dom0less-arm32-gcc-debug: - *arm32-test-needs - debian-unstable-gcc-arm32-debug +qemu-smoke-dom0less-arm32-gcc-staticmem: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh static-mem 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32-staticmem + +qemu-smoke-dom0less-arm32-gcc-debug-staticmem: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh static-mem 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32-debug-staticmem + qemu-alpine-x86_64-gcc: extends: .qemu-x86-64 script:automation/scripts/qemu-smoke-dom0less-arm32.sh +17
-0@@ -20,6 +20,19 @@ echo \"${passed}\" " fi +if [[ "${test_variant}" == "static-mem" ]]; then + # Memory range that is statically allocated to domU1 + domu_base="0x50000000" + domu_size="0x20000000" + passed="${test_variant} test passed" + domU_check=" +mem_range=$(printf \"%08x-%08x\" ${domu_base} $(( ${domu_base} + ${domu_size} - 1 ))) +if grep -q -x \"\${mem_range} : System RAM\" /proc/iomem; then + echo \"${passed}\" +fi +" +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@@ -72,6 +85,10 @@ BOOT_CMD="bootm" UBOOT_SOURCE="boot.source" UBOOT_SCRIPT="boot.scr"' > config +if [[ "${test_variant}" == "static-mem" ]]; then + echo -e "\nDOMU_STATIC_MEM[0]=\"${domu_base} ${domu_size}\"" >> config +fi + rm -rf imagebuilder git clone https://gitlab.com/ViryaOS/imagebuilder bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c configSignature · 1 line
2.25.1
Re: [PATCH v2 3/5] automation: Add a static memory allocation test on arm32
In reply to Michal OrzelQuoted 7 lines · Michal Orzel
automation/gitlab-ci/build.yaml +0
-0@@ -565,6 +565,26 @@ debian-unstable-gcc-arm32-debug-randconfig: HYPERVISOR_ONLY: y RANDCONFIG: y
automation/gitlab-ci/build.yaml debian-unstable-gcc-arm32-debug-randconfig: · line 576
Quoted 10 lines
automation/gitlab-ci/build.yaml +9
-0+debian-unstable-gcc-arm32-staticmem: + extends: .gcc-arm32-cross-build + variables: + CONTAINER: debian:unstable-arm64v8-arm32-gcc + HYPERVISOR_ONLY: y + EXTRA_XEN_CONFIG: | + CONFIG_EXPERT=y + CONFIG_UNSUPPORTED=y + CONFIG_STATIC_MEMORY=y
This is absurd. Either
1) static mem is important enough to warrant testing. By adding it to CI, you have caused the maintainers to accept the responsibility of fixing bugs found in it, making it by definition supported, or
2) it is not important enough to warrant testing, at which point it's not ok to be using XenProject's limited testing resource like this, and it's not ok to be a blocking test.
There is no such thing as an unsupported feature running in CI. It is a complete contradiction in terms.
~Andrew
PATCH v2 4/5 automation: Add a gzip compressed kernel image test on arm32
In reply to Michal OrzelXen 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.
---
Changes in v2:
- take into account dom0 presence
- drop Rb as a result of code changes
--- automation/gitlab-ci/test.yaml | 16 ++++++++++++++++ automation/scripts/qemu-smoke-dom0less-arm32.sh | 13 +++++++++++++ 2 files changed, 29 insertions(+)
automation/gitlab-ci/test.yaml +16 -0
@@ -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:
automation/scripts/qemu-smoke-dom0less-arm32.sh +13 -0
@@ -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
Signature · 1 line
2.25.1
Re: [PATCH v2 4/5] automation: Add a gzip compressed kernel image test on arm32
Quoted 5 lines · Michal Orzel
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.shscript to test booting a domU with a gzip compressed kernel image (in our case zImage).
Quoted 7 lines
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 <[email protected]>
Quoted 70 lines
---
Changes in v2:
- take into account dom0 presence
- drop Rb as a result of code changes--- automation/gitlab-ci/test.yaml | 16 ++++++++++++++++ automation/scripts/qemu-smoke-dom0less-arm32.sh | 13 +++++++++++++ 2 files changed, 29 insertions(+)automation/gitlab-ci/test.yaml +16
-0@@ -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:automation/scripts/qemu-smoke-dom0less-arm32.sh +13
-0@@ -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 configSignature · 1 line
2.25.1
PATCH v2 5/5 automation: Add a true dom0less test on arm32
In reply to Michal OrzelAdd a new test job qemu-smoke-dom0less-arm32-gcc-without-dom0 in debug and non-debug variant that will execute qemu-smoke-dom0less-arm32.sh script to test dom0less domU boot without dom0 (i.e. true dom0less configuration).
By passing "without-dom0" as a test variant, the test will clear the dom0 prompt that we grep for as a last step and remove all the DOM0 related options in ImageBuilder configuration.
---
Changes in v2:
- new patch created as a result of deciding to keep dom0 by default. We still need to test true dom0less configuration, hence added a new test.
--- automation/gitlab-ci/test.yaml | 16 ++++++++++++++++ automation/scripts/qemu-smoke-dom0less-arm32.sh | 13 +++++++++++++ 2 files changed, 29 insertions(+)
automation/gitlab-ci/test.yaml +16 -0
@@ -258,6 +258,22 @@ qemu-smoke-dom0less-arm32-gcc-debug-gzip: - *arm32-test-needs - debian-unstable-gcc-arm32-debug +qemu-smoke-dom0less-arm32-gcc-without-dom0: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh without-dom0 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32 + +qemu-smoke-dom0less-arm32-gcc-debug-without-dom0: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh without-dom0 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32-debug + qemu-alpine-x86_64-gcc: extends: .qemu-x86-64 script:
automation/scripts/qemu-smoke-dom0less-arm32.sh +13 -0
@@ -42,6 +42,15 @@ echo \"${passed}\" " fi +if [[ "${test_variant}" == "without-dom0" ]]; then + # Clear dom0 prompt + dom0_prompt="" + 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
@@ -102,6 +111,10 @@ if [[ "${test_variant}" == "gzip" ]]; then sed -i 's/DOMU_KERNEL\[0\]=.*/DOMU_KERNEL\[0\]="vmlinuz.gz"/' config fi +if [[ "${test_variant}" == "without-dom0" ]]; then + sed -i '/^DOM0/d' config +fi + rm -rf imagebuilder git clone https://gitlab.com/ViryaOS/imagebuilder bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config
Signature · 1 line
2.25.1
Re: [PATCH v2 5/5] automation: Add a true dom0less test on arm32
Quoted 10 lines · Michal Orzel
Add a new test job qemu-smoke-dom0less-arm32-gcc-without-dom0 in debug and non-debug variant that will execute
qemu-smoke-dom0less-arm32.shscript to test dom0less domU boot without dom0 (i.e. true dom0less configuration).By passing "without-dom0" as a test variant, the test will clear the dom0 prompt that we grep for as a last step and remove all the DOM0 related options in ImageBuilder configuration.
Signed-off-by Michal Orzel <[email protected]>
Quoted 70 lines
---
Changes in v2:
- new patch created as a result of deciding to keep dom0 by default. We still need to test true dom0less configuration, hence added a new test.--- automation/gitlab-ci/test.yaml | 16 ++++++++++++++++ automation/scripts/qemu-smoke-dom0less-arm32.sh | 13 +++++++++++++ 2 files changed, 29 insertions(+)automation/gitlab-ci/test.yaml +16
-0@@ -258,6 +258,22 @@ qemu-smoke-dom0less-arm32-gcc-debug-gzip: - *arm32-test-needs - debian-unstable-gcc-arm32-debug +qemu-smoke-dom0less-arm32-gcc-without-dom0: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh without-dom0 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32 + +qemu-smoke-dom0less-arm32-gcc-debug-without-dom0: + extends: .qemu-arm32 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm32.sh without-dom0 2>&1 | tee ${LOGFILE} + needs: + - *arm32-test-needs + - debian-unstable-gcc-arm32-debug + qemu-alpine-x86_64-gcc: extends: .qemu-x86-64 script:automation/scripts/qemu-smoke-dom0less-arm32.sh +13
-0@@ -42,6 +42,15 @@ echo \"${passed}\" " fi +if [[ "${test_variant}" == "without-dom0" ]]; then + # Clear dom0 prompt + dom0_prompt="" + 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@@ -102,6 +111,10 @@ if [[ "${test_variant}" == "gzip" ]]; then sed -i 's/DOMU_KERNEL\[0\]=.*/DOMU_KERNEL\[0\]="vmlinuz.gz"/' config fi +if [[ "${test_variant}" == "without-dom0" ]]; then + sed -i '/^DOM0/d' config +fi + rm -rf imagebuilder git clone https://gitlab.com/ViryaOS/imagebuilder bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c configSignature · 1 line
2.25.1