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

[PATCH v2 4/5] automation: Add a gzip compressed kernel image test on arm32


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 14 Feb 2023 16:38:41 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VrWoeY005CFD5W1azhm+V3ALraRSyeUKG95MNZECaF8=; b=RiCQypaykDEH8zyEUyUnCglaMHqZ/Au4gy6thrngoWiVzNld56Y9+NFDfc/IpIM6m0fAy8OsUv4Pc6WXJPIHCaco2/Z7QpNTde5r19KWGVp0m5nY9JrYlCakvbHDK2pfVB+s9MPKV30Vbee+uLDQCw+uCEbjvSE/ngdorz8cglu2Ez5mGrMrYjXNnXmQxZtf05zd0g+cPQfzJIK5j/6CHsCyHvlLCe2mVBp3b3Pb5kutn2UouwGo/7ISBIAmZYB577veNqXr71CeQ7VYJlstt+J/MdzQNUJvxKNWbxUkDcDJYz5NczZn9dzPpmLUhP8x7JEY2NjaVE3In9TnGa1r6g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bZcH4xujC2G2v82cxAudHWpjXsFoRHAqdcXZ/oIv/aF/KHzqFk4Dc73AIibMKPPQ6FVM1XRiLM2y5hY05zNCIAV8lUWtuD/w9+0b2CD22nGFhVNH3UiI3JQSFEJKINFIHQrFQR96tEJKm2EWosfxl6kF0Ets/tnnCdOjX4pvIEjsfxRv9n0ydVLHb7qbA2P9Px8c1uxAbCpFt4Nrw6oR+B3LOnA/+aBmWFqB9JTJ0ZRylBpzKrn37CQ1jCy/hDXB3NbU5tn03q4PbcF8IOeu2Zi5EmcbX3DCYKGmur7ok79mM+oMpvv/5zFAOKh8FS0Ss8xSkKsOYcZOAjjpJuLtGQ==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Tue, 14 Feb 2023 15:39:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxx>
---
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




 


Rackspace

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