[PATCH 1/2] automation: qemu-smoke-arm64: Use kernel 5.19

Xenia Ragiadakou posted 2 patches 3 years, 6 months ago
There is a newer version of this series
[PATCH 1/2] automation: qemu-smoke-arm64: Use kernel 5.19
Posted by Xenia Ragiadakou 3 years, 6 months ago
Use kernel 5.19 to unblock testing dom0less enhanced.
This kernel version has the necessary patches for deferring xenbus probe
until xenstore is fully initialized.
Also, build kernel with bridging and xen netback support enabled because
it will be used for testing network connectivity between Dom0 and Dom1
over a pv network interface.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
---
 automation/gitlab-ci/build.yaml               | 11 ++++++
 automation/gitlab-ci/test.yaml                |  4 +-
 .../kernel/5.19-arm64v8.dockerfile            | 37 +++++++++++++++++++
 3 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index 23b306e7d0..d2f75a090c 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -597,6 +597,17 @@ kernel-5.9.9-arm64-export:
   tags:
     - arm64
 
+kernel-5.19-arm64-export:
+  extends: .test-jobs-artifact-common
+  image: registry.gitlab.com/xen-project/xen/tests-artifacts/kernel:5.19-arm64v8
+  script:
+    - mkdir binaries && cp /Image binaries/Image
+  artifacts:
+    paths:
+      - binaries/Image
+  tags:
+    - arm64
+
 qemu-system-aarch64-6.0.0-arm64-export:
   extends: .test-jobs-artifact-common
   image: registry.gitlab.com/xen-project/xen/tests-artifacts/qemu-system-aarch64:6.0.0-arm64v8
diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index 6f9f64a8da..aa633fb655 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -70,7 +70,7 @@ qemu-smoke-arm64-gcc:
     - ./automation/scripts/qemu-smoke-arm64.sh 2>&1 | tee qemu-smoke-arm64.log
   needs:
     - debian-unstable-gcc-arm64
-    - kernel-5.9.9-arm64-export
+    - kernel-5.19-arm64-export
     - qemu-system-aarch64-6.0.0-arm64-export
   artifacts:
     paths:
@@ -88,7 +88,7 @@ qemu-smoke-arm64-gcc-staticmem:
     - ./automation/scripts/qemu-smoke-arm64.sh static-mem 2>&1 | tee qemu-smoke-arm64.log
   needs:
     - debian-unstable-gcc-arm64
-    - kernel-5.9.9-arm64-export
+    - kernel-5.19-arm64-export
     - qemu-system-aarch64-6.0.0-arm64-export
   artifacts:
     paths:
diff --git a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile
new file mode 100644
index 0000000000..e445c1f03a
--- /dev/null
+++ b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile
@@ -0,0 +1,37 @@
+FROM arm64v8/debian:unstable
+LABEL maintainer.name="The Xen Project" \
+      maintainer.email="xen-devel@lists.xenproject.org"
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV LINUX_VERSION=5.19
+ENV USER root
+
+RUN mkdir /build
+WORKDIR /build
+
+# build depends
+RUN apt-get update && \
+    apt-get --quiet --yes install \
+        build-essential \
+        libssl-dev \
+        bc \
+        curl \
+        flex \
+        bison \
+        && \
+    \
+    # Build the kernel
+    curl -fsSLO https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$LINUX_VERSION".tar.xz && \
+    tar xvJf linux-"$LINUX_VERSION".tar.xz && \
+    cd linux-"$LINUX_VERSION" && \
+    make defconfig && \
+    sed -i 's/CONFIG_IPV6=m/CONFIG_IPV6=y/g' .config && \
+    sed -i 's/CONFIG_BRIDGE=m/CONFIG_BRIDGE=y/g' .config && \
+    sed -i 's/# CONFIG_XEN_NETDEV_BACKEND is not set/CONFIG_XEN_NETDEV_BACKEND=y/g' .config && \
+    make -j$(nproc) Image.gz && \
+    cp arch/arm64/boot/Image / && \
+    cd /build && \
+    rm -rf linux-"$LINUX_VERSION"* && \
+    apt-get autoremove -y && \
+    apt-get clean && \
+    rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
-- 
2.34.1
Re: [PATCH 1/2] automation: qemu-smoke-arm64: Use kernel 5.19
Posted by Stefano Stabellini 3 years, 6 months ago
On Sat, 6 Aug 2022, Xenia Ragiadakou wrote:
> Use kernel 5.19 to unblock testing dom0less enhanced.
> This kernel version has the necessary patches for deferring xenbus probe
> until xenstore is fully initialized.
> Also, build kernel with bridging and xen netback support enabled because
> it will be used for testing network connectivity between Dom0 and Dom1
> over a pv network interface.
> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  automation/gitlab-ci/build.yaml               | 11 ++++++
>  automation/gitlab-ci/test.yaml                |  4 +-
>  .../kernel/5.19-arm64v8.dockerfile            | 37 +++++++++++++++++++
>  3 files changed, 50 insertions(+), 2 deletions(-)
>  create mode 100644 automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile
> 
> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> index 23b306e7d0..d2f75a090c 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -597,6 +597,17 @@ kernel-5.9.9-arm64-export:
>    tags:
>      - arm64
>  
> +kernel-5.19-arm64-export:
> +  extends: .test-jobs-artifact-common
> +  image: registry.gitlab.com/xen-project/xen/tests-artifacts/kernel:5.19-arm64v8
> +  script:
> +    - mkdir binaries && cp /Image binaries/Image
> +  artifacts:
> +    paths:
> +      - binaries/Image
> +  tags:
> +    - arm64
> +
>  qemu-system-aarch64-6.0.0-arm64-export:
>    extends: .test-jobs-artifact-common
>    image: registry.gitlab.com/xen-project/xen/tests-artifacts/qemu-system-aarch64:6.0.0-arm64v8
> diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
> index 6f9f64a8da..aa633fb655 100644
> --- a/automation/gitlab-ci/test.yaml
> +++ b/automation/gitlab-ci/test.yaml
> @@ -70,7 +70,7 @@ qemu-smoke-arm64-gcc:
>      - ./automation/scripts/qemu-smoke-arm64.sh 2>&1 | tee qemu-smoke-arm64.log
>    needs:
>      - debian-unstable-gcc-arm64
> -    - kernel-5.9.9-arm64-export
> +    - kernel-5.19-arm64-export
>      - qemu-system-aarch64-6.0.0-arm64-export
>    artifacts:
>      paths:
> @@ -88,7 +88,7 @@ qemu-smoke-arm64-gcc-staticmem:
>      - ./automation/scripts/qemu-smoke-arm64.sh static-mem 2>&1 | tee qemu-smoke-arm64.log
>    needs:
>      - debian-unstable-gcc-arm64
> -    - kernel-5.9.9-arm64-export
> +    - kernel-5.19-arm64-export
>      - qemu-system-aarch64-6.0.0-arm64-export
>    artifacts:
>      paths:
> diff --git a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile
> new file mode 100644
> index 0000000000..e445c1f03a
> --- /dev/null
> +++ b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile
> @@ -0,0 +1,37 @@
> +FROM arm64v8/debian:unstable
> +LABEL maintainer.name="The Xen Project" \
> +      maintainer.email="xen-devel@lists.xenproject.org"
> +
> +ENV DEBIAN_FRONTEND=noninteractive
> +ENV LINUX_VERSION=5.19
> +ENV USER root
> +
> +RUN mkdir /build
> +WORKDIR /build
> +
> +# build depends
> +RUN apt-get update && \
> +    apt-get --quiet --yes install \
> +        build-essential \
> +        libssl-dev \
> +        bc \
> +        curl \
> +        flex \
> +        bison \
> +        && \
> +    \
> +    # Build the kernel
> +    curl -fsSLO https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$LINUX_VERSION".tar.xz && \
> +    tar xvJf linux-"$LINUX_VERSION".tar.xz && \
> +    cd linux-"$LINUX_VERSION" && \
> +    make defconfig && \
> +    sed -i 's/CONFIG_IPV6=m/CONFIG_IPV6=y/g' .config && \
> +    sed -i 's/CONFIG_BRIDGE=m/CONFIG_BRIDGE=y/g' .config && \
> +    sed -i 's/# CONFIG_XEN_NETDEV_BACKEND is not set/CONFIG_XEN_NETDEV_BACKEND=y/g' .config && \
> +    make -j$(nproc) Image.gz && \
> +    cp arch/arm64/boot/Image / && \
> +    cd /build && \
> +    rm -rf linux-"$LINUX_VERSION"* && \
> +    apt-get autoremove -y && \
> +    apt-get clean && \
> +    rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
> -- 
> 2.34.1
>