Skip to contentSkip to conversation

automation: minor fixes and improvements

PATCH Superseded Roger Pau Monne 2 participants 18 messages Nov 16, 2023 – Nov 20, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover automation: minor fixes and improvements

Hello,

Some assorted minor fixes and improvements, as a result of work I'm doing to expand the tests.

I've done a full run with the updated containers, and found no major issues:

https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137

There's however one tests that fails with the updated container, debian-buster-gcc-ibt:

https://gitlab.com/xen-project/people/royger/xen/-/jobs/5550235258

With:

$ ./automation/scripts/build 2>&1 | tee build.log
+ test -f /etc/os-release
+ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
+ cc=gcc
+ gcc --version
./automation/scripts/build: line 10: /opt/gcc-11-ibt/bin/gcc: No such file or directory

I assume there's something wrong in the Dockerfile, but not caused by this series.

I suggest we hold off updating debian:buster-gcc-ibt image until this is fixed.

Note the bookworm amd64 image must be updated in the registry ahead of pushing the changes here (patch 4/6 depends on the new image).

Thanks, Roger.

Roger Pau Monne (6):
automation: remove CR characters from QEMU serial
automation: add timestamps to QEMU non-smoke x86-64 test
automation: fix jessie/stretch images to use archive.debian.org apt
repos
automation: update tests to use Debian Bookworm
automation: set architecture in docker files
automation: switch to multi-platform images when possible

 automation/build/alpine/3.18-arm64v8.dockerfile    |  2 +-
 automation/build/alpine/3.18.dockerfile            |  2 +-
 .../build/archlinux/current-riscv64.dockerfile     |  2 +-
 automation/build/archlinux/current.dockerfile      |  2 +-
 automation/build/centos/7.dockerfile               |  2 +-
 .../debian/bookworm-arm64v8-arm32-gcc.dockerfile   |  2 +-
 .../build/debian/bookworm-arm64v8.dockerfile       |  2 +-
 .../build/debian/bookworm-cppcheck.dockerfile      |  2 +-
 automation/build/debian/bookworm-i386.dockerfile   |  2 +-
 automation/build/debian/bookworm.dockerfile        |  7 ++++++-
 .../build/debian/bullseye-ppc64le.dockerfile       |  2 +-
 automation/build/debian/buster-gcc-ibt.dockerfile  |  2 +-
 automation/build/debian/jessie-i386.dockerfile     |  7 +++++++
 automation/build/debian/jessie.dockerfile          |  9 ++++++++-
 automation/build/debian/stretch-i386.dockerfile    |  9 ++++++++-
 automation/build/debian/stretch.dockerfile         | 14 ++++++++------
 automation/build/fedora/29.dockerfile              |  2 +-
 automation/build/suse/opensuse-leap.dockerfile     |  2 +-
 .../build/suse/opensuse-tumbleweed.dockerfile      |  2 +-
 automation/build/ubuntu/bionic.dockerfile          |  2 +-
 automation/build/ubuntu/focal.dockerfile           |  2 +-
 automation/build/ubuntu/trusty.dockerfile          |  2 +-
 automation/build/ubuntu/xenial-xilinx.dockerfile   |  2 +-
 automation/build/ubuntu/xenial.dockerfile          |  2 +-
 automation/gitlab-ci/test.yaml                     |  4 ++--
 automation/scripts/qemu-alpine-x86_64.sh           |  7 +++++--
 26 files changed, 63 insertions(+), 32 deletions(-)
Signature · 1 line
2.42.0
#1 lore raw

PATCH 1/6 automation: remove CR characters from QEMU serial

The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" sequence on the web interface used as line returns by the Linux kernel serial output. This leads to the QEMU tests output looking like:

(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) (XEN) Freed 664kB init memory
mapping kernel into physical memory
about to get started...
qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)

This not helpful, so strip the CR characters from the output that goes to stdout, leaving the output in the smoke.serial untouched.

Fixes 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')
---
 automation/scripts/qemu-alpine-x86_64.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
automation/scripts/qemu-alpine-x86_64.sh +4 -1
index 8c8d0b0cd759..a1c41c030a47 100755
@@ -84,7 +84,10 @@ qemu-system-x86_64 \
     -monitor none -serial stdio \
     -nographic \
     -device virtio-net-pci,netdev=n0 \
-    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& tee smoke.serial
+    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& \
+        # Remove carriage returns from the stdout output, as gitlab
+        # interface chokes on them
+        tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1
Signature · 1 line
2.42.0
#2 lore raw

Re: [PATCH 1/6] automation: remove CR characters from QEMU serial

Quoted 11 lines · Roger Pau Monne

The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" sequence on the web interface used as line returns by the Linux kernel serial output. This leads to the QEMU tests output looking like:

(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) (XEN) Freed 664kB init memory
mapping kernel into physical memory
about to get started...
qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)

Quoted 5 lines

This not helpful, so strip the CR characters from the output that goes to stdout, leaving the output in the smoke.serial untouched.

Fixes 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')

Thanks for the patch. Let me see if I understood correctly.

In the gitlab web UI everything after the last (XEN) log line disappears, for instance:

https://gitlab.com/xen-project/xen/-/jobs/5556551478

(XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 / # qemu-system-aarch64: terminating on signal 15 from pid 145 (timeout)

While if I look at the full logs there are plenty of Linux kernel logs after it:
https://cdn.artifacts.gitlab-static.net/ec/ad/ecad5145a0ec1eb179fd47d1590d5ec43d705e8af2f9a816607ac31891cb82b9/2023_11_16/5556551478/6032156805/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1700183635&KeyName=gprd-artifacts-cdn&Signature=vT8CBwI2Th23OvRvQKvNPgHiT5Y=

And this patch aims at fixing that, is that correct?

But I went to check your pipeline
https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
and the corresponding job
https://gitlab.com/xen-project/people/royger/xen/-/jobs/5549620441 has the same issue?

Quoted 23 lines
---
 automation/scripts/qemu-alpine-x86_64.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
automation/scripts/qemu-alpine-x86_64.sh +4 -1
index 8c8d0b0cd759..a1c41c030a47 100755
@@ -84,7 +84,10 @@ qemu-system-x86_64 \
     -monitor none -serial stdio \
     -nographic \
     -device virtio-net-pci,netdev=n0 \
-    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& tee smoke.serial
+    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& \
+        # Remove carriage returns from the stdout output, as gitlab
+        # interface chokes on them
+        tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1
Signature · 1 line
2.42.0
Reviewed-by
#3 lore raw

Re: [PATCH 1/6] automation: remove CR characters from QEMU serial

Quoted 33 lines · Stefano Stabellini
Quoted 11 lines · Roger Pau Monne

The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" sequence on the web interface used as line returns by the Linux kernel serial output. This leads to the QEMU tests output looking like:

(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) (XEN) Freed 664kB init memory
mapping kernel into physical memory
about to get started...
qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)

Quoted 5 lines

This not helpful, so strip the CR characters from the output that goes to stdout, leaving the output in the smoke.serial untouched.

Fixes 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')

Thanks for the patch. Let me see if I understood correctly.

In the gitlab web UI everything after the last (XEN) log line disappears, for instance:

https://gitlab.com/xen-project/xen/-/jobs/5556551478

(XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 / # qemu-system-aarch64: terminating on signal 15 from pid 145 (timeout)

While if I look at the full logs there are plenty of Linux kernel logs after it:
https://cdn.artifacts.gitlab-static.net/ec/ad/ecad5145a0ec1eb179fd47d1590d5ec43d705e8af2f9a816607ac31891cb82b9/2023_11_16/5556551478/6032156805/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1700183635&KeyName=gprd-artifacts-cdn&Signature=vT8CBwI2Th23OvRvQKvNPgHiT5Y=

Quoted 8 lines

And this patch aims at fixing that, is that correct?

But I went to check your pipeline
https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
and the corresponding job
https://gitlab.com/xen-project/people/royger/xen/-/jobs/5549620441 has the same issue?

I take it back: you only fixed qemu-alpine-x86_64.sh and not the other.

Can you please add a quick patch to do the same for all the other qemu-* scripts?

Quoted 23 lines
Quoted 23 lines
---
 automation/scripts/qemu-alpine-x86_64.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
automation/scripts/qemu-alpine-x86_64.sh +4 -1
index 8c8d0b0cd759..a1c41c030a47 100755
@@ -84,7 +84,10 @@ qemu-system-x86_64 \
     -monitor none -serial stdio \
     -nographic \
     -device virtio-net-pci,netdev=n0 \
-    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& tee smoke.serial
+    -netdev user,id=n0,tftp=binaries,bootfile=/pxelinux.0 |& \
+        # Remove carriage returns from the stdout output, as gitlab
+        # interface chokes on them
+        tee smoke.serial | sed 's/\r//'
 
 set -e
 (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1
Signature · 1 line
2.42.0
#4 lore raw

Re: [PATCH 1/6] automation: remove CR characters from QEMU serial

In reply to Stefano Stabellini
Quoted 33 lines · Stefano Stabellini
Quoted 11 lines · Roger Pau Monne

The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" sequence on the web interface used as line returns by the Linux kernel serial output. This leads to the QEMU tests output looking like:

(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) (XEN) Freed 664kB init memory
mapping kernel into physical memory
about to get started...
qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)

Quoted 5 lines

This not helpful, so strip the CR characters from the output that goes to stdout, leaving the output in the smoke.serial untouched.

Fixes 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')

Thanks for the patch. Let me see if I understood correctly.

In the gitlab web UI everything after the last (XEN) log line disappears, for instance:

https://gitlab.com/xen-project/xen/-/jobs/5556551478

(XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 / # qemu-system-aarch64: terminating on signal 15 from pid 145 (timeout)

While if I look at the full logs there are plenty of Linux kernel logs after it:
https://cdn.artifacts.gitlab-static.net/ec/ad/ecad5145a0ec1eb179fd47d1590d5ec43d705e8af2f9a816607ac31891cb82b9/2023_11_16/5556551478/6032156805/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1700183635&KeyName=gprd-artifacts-cdn&Signature=vT8CBwI2Th23OvRvQKvNPgHiT5Y=

Quoted 8 lines

And this patch aims at fixing that, is that correct?

But I went to check your pipeline
https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
and the corresponding job
https://gitlab.com/xen-project/people/royger/xen/-/jobs/5549620441 has the same issue?

I made the change just for qemu-alpine-x86_64-gcc:

https://gitlab.com/xen-project/people/royger/xen/-/jobs/5550049674

I didn't realize qemu-smoke-dom0-arm64-gcc was also using it. If the fix is acceptable I can submit v2 adding the arm instances also.

Thanks, Roger.

#5 lore raw

Re: [PATCH 1/6] automation: remove CR characters from QEMU serial

Quoted 43 lines · Roger Pau Monné
Quoted 33 lines · Stefano Stabellini
Quoted 11 lines · Roger Pau Monne

The gitlab CI webpage seems to have issues displaying the \CR\CR\LF "\r\r\n" sequence on the web interface used as line returns by the Linux kernel serial output. This leads to the QEMU tests output looking like:

(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) (XEN) Freed 664kB init memory
mapping kernel into physical memory
about to get started...
qemu-system-x86_64: terminating on signal 15 from pid 52 (timeout)

Quoted 5 lines

This not helpful, so strip the CR characters from the output that goes to stdout, leaving the output in the smoke.serial untouched.

Fixes 3030a73bf849 ('automation: add a QEMU based x86_64 Dom0/DomU test')

Thanks for the patch. Let me see if I understood correctly.

In the gitlab web UI everything after the last (XEN) log line disappears, for instance:

https://gitlab.com/xen-project/xen/-/jobs/5556551478

(XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0 / # qemu-system-aarch64: terminating on signal 15 from pid 145 (timeout)

While if I look at the full logs there are plenty of Linux kernel logs after it:
https://cdn.artifacts.gitlab-static.net/ec/ad/ecad5145a0ec1eb179fd47d1590d5ec43d705e8af2f9a816607ac31891cb82b9/2023_11_16/5556551478/6032156805/job.log?response-content-type=text%2Fplain%3B%20charset%3Dutf-8&response-content-disposition=inline&Expires=1700183635&KeyName=gprd-artifacts-cdn&Signature=vT8CBwI2Th23OvRvQKvNPgHiT5Y=

Quoted 8 lines

And this patch aims at fixing that, is that correct?

But I went to check your pipeline
https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137
and the corresponding job
https://gitlab.com/xen-project/people/royger/xen/-/jobs/5549620441 has the same issue?

Quoted 6 lines

I made the change just for qemu-alpine-x86_64-gcc:

https://gitlab.com/xen-project/people/royger/xen/-/jobs/5550049674

I didn't realize qemu-smoke-dom0-arm64-gcc was also using it. If the fix is acceptable I can submit v2 adding the arm instances also.

Yes the fix is fine. All the qemu scripts are copy/paste design right now and I am aware they need to be unified. It is not just qemu-smoke-dom0-arm64-gcc, also qemu-smoke-dom0less-arm64.sh and basically all the other scripts that start QEMU.

#6 lore raw

PATCH 2/6 automation: add timestamps to QEMU non-smoke x86-64 test

In reply to Roger Pau Monne
---
 automation/scripts/qemu-alpine-x86_64.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
automation/scripts/qemu-alpine-x86_64.sh +1 -1
index a1c41c030a47..8e398dcea34b 100755
@@ -68,7 +68,7 @@ cd ../..
 cat >> binaries/pxelinux.0 << EOF
 #!ipxe
 
-kernel xen console=com1
+kernel xen console=com1 console_timestamps=boot
 module bzImage console=hvc0
 module xen-rootfs.cpio.gz
 boot
Signature · 1 line
2.42.0
Reviewed-by on v1 2/6
#7 lore raw

Re: [PATCH 2/6] automation: add timestamps to QEMU non-smoke x86-64 test

Quoted 1 line · Roger Pau Monne

Same here please apply to the other qemu-* scripts too

Quoted 20 lines
---
 automation/scripts/qemu-alpine-x86_64.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
automation/scripts/qemu-alpine-x86_64.sh +1 -1
index a1c41c030a47..8e398dcea34b 100755
@@ -68,7 +68,7 @@ cd ../..
 cat >> binaries/pxelinux.0 << EOF
 #!ipxe
 
-kernel xen console=com1
+kernel xen console=com1 console_timestamps=boot
 module bzImage console=hvc0
 module xen-rootfs.cpio.gz
 boot
Signature · 1 line
2.42.0
#8 lore raw

PATCH 3/6 automation: fix jessie/stretch images to use archive.debian.org apt repos

In reply to Roger Pau Monne

Otherwise it's impossible to build the images.

---
 automation/build/debian/jessie-i386.dockerfile  | 7 +++++++
 automation/build/debian/jessie.dockerfile       | 7 +++++++
 automation/build/debian/stretch-i386.dockerfile | 7 +++++++
 automation/build/debian/stretch.dockerfile      | 7 +++++++
 4 files changed, 28 insertions(+)
automation/build/debian/jessie-i386.dockerfile +7 -0
index c9ac15a3ffd6..a8dec82bb299 100644
@@ -10,6 +10,13 @@ WORKDIR /build
 
 ENTRYPOINT ["linux32"]
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ jessie main contrib non-free
+deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/jessie.dockerfile +7 -0
index 63b2c1e5b771..5c71c3e3ea75 100644
@@ -8,6 +8,13 @@ ENV USER root
 RUN mkdir /build
 WORKDIR /build
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ jessie main contrib non-free
+deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/stretch-i386.dockerfile +7 -0
index d93f74c979ef..9739651e25dd 100644
@@ -10,6 +10,13 @@ WORKDIR /build
 
 ENTRYPOINT ["linux32"]
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ stretch main contrib non-free
+deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/stretch.dockerfile +7 -0
index 1af6c691f8f4..2f1a99f45017 100644
@@ -8,6 +8,13 @@ ENV USER root
 RUN mkdir /build
 WORKDIR /build
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ stretch main contrib non-free
+deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
Signature · 1 line
2.42.0
Reviewed-by on v1 3/6
#9 lore raw

Re: [PATCH 3/6] automation: fix jessie/stretch images to use archive.debian.org apt repos

Quoted 3 lines · Roger Pau Monne

Otherwise it's impossible to build the images.

Quoted 82 lines
---
 automation/build/debian/jessie-i386.dockerfile  | 7 +++++++
 automation/build/debian/jessie.dockerfile       | 7 +++++++
 automation/build/debian/stretch-i386.dockerfile | 7 +++++++
 automation/build/debian/stretch.dockerfile      | 7 +++++++
 4 files changed, 28 insertions(+)
automation/build/debian/jessie-i386.dockerfile +7 -0
index c9ac15a3ffd6..a8dec82bb299 100644
@@ -10,6 +10,13 @@ WORKDIR /build
 
 ENTRYPOINT ["linux32"]
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ jessie main contrib non-free
+deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/jessie.dockerfile +7 -0
index 63b2c1e5b771..5c71c3e3ea75 100644
@@ -8,6 +8,13 @@ ENV USER root
 RUN mkdir /build
 WORKDIR /build
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ jessie main contrib non-free
+deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/stretch-i386.dockerfile +7 -0
index d93f74c979ef..9739651e25dd 100644
@@ -10,6 +10,13 @@ WORKDIR /build
 
 ENTRYPOINT ["linux32"]
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ stretch main contrib non-free
+deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
automation/build/debian/stretch.dockerfile +7 -0
index 1af6c691f8f4..2f1a99f45017 100644
@@ -8,6 +8,13 @@ ENV USER root
 RUN mkdir /build
 WORKDIR /build
 
+# replace repos in archive as release is EOL
+RUN cat <<"END" > /etc/apt/sources.list
+deb http://archive.debian.org/debian/ stretch main contrib non-free
+deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
+deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
+END
+
 # build depends
 RUN apt-get update && \
     apt-get --quiet --yes install \
Signature · 1 line
2.42.0
#10 lore raw

PATCH 4/6 automation: update tests to use Debian Bookworm

In reply to Roger Pau Monne

Switch tests using Stretch to Bookworm, as Stretch is EOL.

Note the packages are not removed from the Stretch dockerfile, because the tests in stable branches will run using the old containers.

---
The Bookworm container needs to be updated to contain the required tools before pushing this change.

---
 automation/build/debian/bookworm.dockerfile | 5 +++++
 automation/gitlab-ci/test.yaml              | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
automation/build/debian/bookworm.dockerfile +5 -0
index ae008c8d46e5..7aea081c13a9 100644
@@ -46,6 +46,11 @@ RUN apt-get update && \
         gnupg \
         apt-transport-https \
         golang \
+        # for test phase, qemu-smoke-* jobs
+        qemu-system-x86 \
+        # for test phase, qemu-alpine-* jobs
+        cpio \
+        busybox-static \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/gitlab-ci/test.yaml +2 -2
index 61e642cce0cc..6aabdb9d156f 100644
@@ -43,7 +43,7 @@
 .qemu-x86-64:
   extends: .test-jobs-common
   variables:
-    CONTAINER: debian:stretch
+    CONTAINER: debian:bookworm
     LOGFILE: qemu-smoke-x86-64.log
   artifacts:
     paths:
@@ -130,7 +130,7 @@
 build-each-commit-gcc:
   extends: .test-jobs-common
   variables:
-    CONTAINER: debian:stretch
+    CONTAINER: debian:bookworm
     XEN_TARGET_ARCH: x86_64
     CC: gcc
   script:
Signature · 1 line
2.42.0
Reviewed-by on v1 4/6
#11 lore raw

Re: [PATCH 4/6] automation: update tests to use Debian Bookworm

Quoted 6 lines · Roger Pau Monne

Switch tests using Stretch to Bookworm, as Stretch is EOL.

Note the packages are not removed from the Stretch dockerfile, because the tests in stable branches will run using the old containers.

Quoted 3 lines

---
The Bookworm container needs to be updated to contain the required tools before pushing this change.

I'll do that after the release just to stay on the safe side

Quoted 46 lines
---
 automation/build/debian/bookworm.dockerfile | 5 +++++
 automation/gitlab-ci/test.yaml              | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
automation/build/debian/bookworm.dockerfile +5 -0
index ae008c8d46e5..7aea081c13a9 100644
@@ -46,6 +46,11 @@ RUN apt-get update && \
         gnupg \
         apt-transport-https \
         golang \
+        # for test phase, qemu-smoke-* jobs
+        qemu-system-x86 \
+        # for test phase, qemu-alpine-* jobs
+        cpio \
+        busybox-static \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/gitlab-ci/test.yaml +2 -2
index 61e642cce0cc..6aabdb9d156f 100644
@@ -43,7 +43,7 @@
 .qemu-x86-64:
   extends: .test-jobs-common
   variables:
-    CONTAINER: debian:stretch
+    CONTAINER: debian:bookworm
     LOGFILE: qemu-smoke-x86-64.log
   artifacts:
     paths:
@@ -130,7 +130,7 @@
 build-each-commit-gcc:
   extends: .test-jobs-common
   variables:
-    CONTAINER: debian:stretch
+    CONTAINER: debian:bookworm
     XEN_TARGET_ARCH: x86_64
     CC: gcc
   script:
Signature · 1 line
2.42.0
#12 lore raw

PATCH 5/6 automation: set architecture in docker files

In reply to Roger Pau Monne

Pass the desired architecture of the image in the FROM instruction if the image is possibly multi-platform.

This allows using the x86 Dockerfiles on OS X on arm64 hardware.

No functional change intended.

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

---
 automation/build/alpine/3.18.dockerfile               | 2 +-
 automation/build/archlinux/current-riscv64.dockerfile | 2 +-
 automation/build/archlinux/current.dockerfile         | 2 +-
 automation/build/centos/7.dockerfile                  | 2 +-
 automation/build/debian/bookworm.dockerfile           | 2 +-
 automation/build/debian/bullseye-ppc64le.dockerfile   | 2 +-
 automation/build/debian/buster-gcc-ibt.dockerfile     | 2 +-
 automation/build/debian/jessie.dockerfile             | 2 +-
 automation/build/debian/stretch.dockerfile            | 2 +-
 automation/build/fedora/29.dockerfile                 | 2 +-
 automation/build/suse/opensuse-leap.dockerfile        | 2 +-
 automation/build/suse/opensuse-tumbleweed.dockerfile  | 2 +-
 automation/build/ubuntu/bionic.dockerfile             | 2 +-
 automation/build/ubuntu/focal.dockerfile              | 2 +-
 automation/build/ubuntu/trusty.dockerfile             | 2 +-
 automation/build/ubuntu/xenial-xilinx.dockerfile      | 2 +-
 automation/build/ubuntu/xenial.dockerfile             | 2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)
automation/build/alpine/3.18.dockerfile +1 -1
index 5d2a69a06010..4ae9cb5e9e30 100644
@@ -1,4 +1,4 @@
-FROM alpine:3.18
+FROM --platform=linux/amd64 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/archlinux/current-riscv64.dockerfile +1 -1
index abf8e7bf0b88..af75b5c720ce 100644
@@ -1,4 +1,4 @@
-FROM archlinux
+FROM --platform=linux/amd64 archlinux
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/archlinux/current.dockerfile +1 -1
index 47e79637a4a6..d974a1434fd5 100644
@@ -1,4 +1,4 @@
-FROM archlinux:base-devel
+FROM --platform=linux/amd64 archlinux:base-devel
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/centos/7.dockerfile +1 -1
index 69dcefb2f011..ab450f0b3a0e 100644
@@ -1,4 +1,4 @@
-FROM centos:7
+FROM --platform=linux/amd64 centos:7
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm.dockerfile +1 -1
index 7aea081c13a9..459f8e30bdc6 100644
@@ -1,4 +1,4 @@
-FROM debian:bookworm
+FROM --platform=linux/amd64 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bullseye-ppc64le.dockerfile +1 -1
index 4de8458445ae..6fdfb6bc2b40 100644
@@ -1,4 +1,4 @@
-FROM debian:bullseye-slim
+FROM --platform=linux/amd64 debian:bullseye-slim
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/buster-gcc-ibt.dockerfile +1 -1
index 96ab4fe8a2f1..4328c109b72b 100644
@@ -1,4 +1,4 @@
-FROM debian:buster-slim AS builder
+FROM --platform=linux/amd64 debian:buster-slim AS builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV USER root
automation/build/debian/jessie.dockerfile +1 -1
index 5c71c3e3ea75..32fc952fbc2d 100644
@@ -1,4 +1,4 @@
-FROM debian/eol:jessie
+FROM --platform=linux/amd64 debian/eol:jessie
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/stretch.dockerfile +1 -1
index 2f1a99f45017..e2706a8f3589 100644
@@ -1,4 +1,4 @@
-FROM debian:stretch
+FROM --platform=linux/amd64 debian:stretch
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/fedora/29.dockerfile +1 -1
index e55b06a4517e..42a87ce6c84b 100644
@@ -1,4 +1,4 @@
-FROM fedora:29
+FROM --platform=linux/amd64 fedora:29
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/suse/opensuse-leap.dockerfile +1 -1
index 7010b71acaa0..e1ec38a41445 100644
@@ -1,4 +1,4 @@
-FROM opensuse/leap
+FROM --platform=linux/amd64 opensuse/leap
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/suse/opensuse-tumbleweed.dockerfile +1 -1
index 959e1f6939f0..38f6fda2ff1b 100644
@@ -1,4 +1,4 @@
-FROM opensuse/tumbleweed
+FROM --platform=linux/amd64 opensuse/tumbleweed
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/bionic.dockerfile +1 -1
index e15f54431efb..77d7f933860c 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:18.04
+FROM --platform=linux/amd64 ubuntu:18.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/focal.dockerfile +1 -1
index e3d11194ee2f..30a9b8e84ffe 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:20.04
+FROM --platform=linux/amd64 ubuntu:20.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/trusty.dockerfile +1 -1
index 22e294c20cac..0d33578c4e1d 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04
+FROM --platform=linux/amd64 ubuntu:14.04
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/xenial-xilinx.dockerfile +1 -1
index 5f7087135213..49f27b322995 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:16.04
+FROM --platform=linux/amd64 ubuntu:16.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
automation/build/ubuntu/xenial.dockerfile +1 -1
index 2d2ba3e31f63..e8035434f804 100644
@@ -1,4 +1,4 @@
-FROM ubuntu:16.04
+FROM --platform=linux/amd64 ubuntu:16.04
 LABEL maintainer.name="The Xen Project " \
       maintainer.email="[email protected]"
 
Signature · 1 line
2.42.0
#13 lore raw

PATCH 6/6 automation: switch to multi-platform images when possible

In reply to Roger Pau Monne

Instead of using specific architecture image, switch to using multi-arch ones and specify the desired architecture using the --platform option.

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

---
 automation/build/alpine/3.18-arm64v8.dockerfile               | 2 +-
 automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 2 +-
 automation/build/debian/bookworm-arm64v8.dockerfile           | 2 +-
 automation/build/debian/bookworm-cppcheck.dockerfile          | 2 +-
 automation/build/debian/bookworm-i386.dockerfile              | 2 +-
 automation/build/debian/stretch-i386.dockerfile               | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
automation/build/alpine/3.18-arm64v8.dockerfile +1 -1
index 470f5d72a921..91e90220240f 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/alpine:3.18
+FROM --platform=linux/arm64/v8 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile +1 -1
index b3295c435ed5..a05ffeac04f9 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-arm64v8.dockerfile +1 -1
index 640b1e0eadf2..2c432aacb765 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-cppcheck.dockerfile +1 -1
index d64fb7b18c66..d368d69472cb 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm AS builder
+FROM --platform=linux/arm64/v8 debian:bookworm AS builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV CPPCHECK_VERSION=2.7
automation/build/debian/bookworm-i386.dockerfile +1 -1
index 559bf670f0f1..89a650338566 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:bookworm
+FROM --platform=linux/i386 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/stretch-i386.dockerfile +1 -1
index 9739651e25dd..da93fed8ea68 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:stretch
+FROM --platform=linux/i386 debian:stretch
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
Signature · 1 line
2.42.0
#14 lore raw

Re: [PATCH 6/6] automation: switch to multi-platform images when possible

Quoted 6 lines · Roger Pau Monne

Instead of using specific architecture image, switch to using multi-arch ones and specify the desired architecture using the --platform option.

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

We are missing:

automation/build/debian/buster-gcc-ibt.dockerfile automation/build/debian/bookworm-cppcheck.dockerfile automation/tests-artifacts/*

Aside from that, it is fine.

How did you test the updated containers? Have you already pushed them to the registry?

Quoted 72 lines
---
 automation/build/alpine/3.18-arm64v8.dockerfile               | 2 +-
 automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 2 +-
 automation/build/debian/bookworm-arm64v8.dockerfile           | 2 +-
 automation/build/debian/bookworm-cppcheck.dockerfile          | 2 +-
 automation/build/debian/bookworm-i386.dockerfile              | 2 +-
 automation/build/debian/stretch-i386.dockerfile               | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
automation/build/alpine/3.18-arm64v8.dockerfile +1 -1
index 470f5d72a921..91e90220240f 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/alpine:3.18
+FROM --platform=linux/arm64/v8 alpine:3.18
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile +1 -1
index b3295c435ed5..a05ffeac04f9 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-arm64v8.dockerfile +1 -1
index 640b1e0eadf2..2c432aacb765 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm
+FROM --platform=linux/arm64/v8 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/bookworm-cppcheck.dockerfile +1 -1
index d64fb7b18c66..d368d69472cb 100644
@@ -1,4 +1,4 @@
-FROM arm64v8/debian:bookworm AS builder
+FROM --platform=linux/arm64/v8 debian:bookworm AS builder
 
 ENV DEBIAN_FRONTEND=noninteractive
 ENV CPPCHECK_VERSION=2.7
automation/build/debian/bookworm-i386.dockerfile +1 -1
index 559bf670f0f1..89a650338566 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:bookworm
+FROM --platform=linux/i386 debian:bookworm
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/stretch-i386.dockerfile +1 -1
index 9739651e25dd..da93fed8ea68 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:stretch
+FROM --platform=linux/i386 debian:stretch
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
Signature · 1 line
2.42.0
#15 lore raw

Re: [PATCH 6/6] automation: switch to multi-platform images when possible

Quoted 11 lines · Stefano Stabellini
Quoted 6 lines · Roger Pau Monne

Instead of using specific architecture image, switch to using multi-arch ones and specify the desired architecture using the --platform option.

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

We are missing:

automation/build/debian/buster-gcc-ibt.dockerfile

That file was updated in patch 5/6:

https://lore.kernel.org/xen-devel/[email protected]/

Quoted 1 line

automation/build/debian/bookworm-cppcheck.dockerfile

Not sure I'm following, bookworm-cppcheck.dockerfile is updated...

Quoted 1 line

automation/tests-artifacts/*

Oh, didn't realize about those, I will do in a separate patch.

Quoted 4 lines

Aside from that, it is fine.

How did you test the updated containers? Have you already pushed them to the registry?

I've pushed them to my local registry and changed the registry in one of my Xen branches, see:

https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137

Some jobs failed because the runners run out of space.

Thanks, Roger.

#16 lore raw

Re: [PATCH 6/6] automation: switch to multi-platform images when possible

Quoted 17 lines · Roger Pau Monné
Quoted 11 lines · Stefano Stabellini
Quoted 6 lines · Roger Pau Monne

Instead of using specific architecture image, switch to using multi-arch ones and specify the desired architecture using the --platform option.

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

We are missing:

automation/build/debian/buster-gcc-ibt.dockerfile

That file was updated in patch 5/6:

https://lore.kernel.org/xen-devel/[email protected]/

Quoted 7 lines
Quoted 1 line

automation/build/debian/bookworm-cppcheck.dockerfile

Not sure I'm following, bookworm-cppcheck.dockerfile is updated...

Quoted 1 line

automation/tests-artifacts/*

Oh, didn't realize about those, I will do in a separate patch.

Thanks!

Quoted 11 lines
Quoted 4 lines

Aside from that, it is fine.

How did you test the updated containers? Have you already pushed them to the registry?

I've pushed them to my local registry and changed the registry in one of my Xen branches, see:

https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137

Some jobs failed because the runners run out of space.

Oh, OK. It is going to be a lot of work to rebuild and push all the containers and I wouldn't mind you doing that once the patches are acked. In fact it would be great if you pushed the containers once you tests that they work as expected. If you don't have the right access permissions, I can do that too

#17 lore raw

Re: [PATCH 6/6] automation: switch to multi-platform images when possible

Quoted 39 lines · Stefano Stabellini
Quoted 17 lines · Roger Pau Monné
Quoted 11 lines · Stefano Stabellini
Quoted 6 lines · Roger Pau Monne

Instead of using specific architecture image, switch to using multi-arch ones and specify the desired architecture using the --platform option.

---
I haven't touched the Yocto dockerfile because I'm not sure how it's used.

We are missing:

automation/build/debian/buster-gcc-ibt.dockerfile

That file was updated in patch 5/6:

https://lore.kernel.org/xen-devel/[email protected]/

Quoted 7 lines
Quoted 1 line

automation/build/debian/bookworm-cppcheck.dockerfile

Not sure I'm following, bookworm-cppcheck.dockerfile is updated...

Quoted 1 line

automation/tests-artifacts/*

Oh, didn't realize about those, I will do in a separate patch.

Thanks!

Quoted 10 lines
Quoted 4 lines

Aside from that, it is fine.

How did you test the updated containers? Have you already pushed them to the registry?

I've pushed them to my local registry and changed the registry in one of my Xen branches, see:

https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1074512137

Quoted 7 lines
Quoted 1 line

Some jobs failed because the runners run out of space.

Oh, OK. It is going to be a lot of work to rebuild and push all the containers and I wouldn't mind you doing that once the patches are acked. In fact it would be great if you pushed the containers once you tests that they work as expected. If you don't have the right access permissions, I can do that too

For the patches only the x86 bookworm container needs to be rebuild in order to contain the packages required by the test step.

The rest can be updated either before or after the series has been committed.

Thanks, Roger.