Message ID | 20230214153842.15637-5-michal.orzel@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | automation: dom0less arm32 testing | expand |
On Tue, 14 Feb 2023, Michal Orzel wrote: > 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> > --- > 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(+) > > diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml > index c2bcc5d4d3e5..be7a55d89708 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 bd89a3f8b45e..c2e331451d99 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 > -- > 2.25.1 >
diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index c2bcc5d4d3e5..be7a55d89708 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 bd89a3f8b45e..c2e331451d99 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
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> --- 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(+)