automation: minor fixes and improvements
Subsystems (2)
v2 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 issues:
https://gitlab.com/xen-project/people/royger/xen/-/pipelines/1080250168
Thanks, Roger.
Roger Pau Monne (7):
automation: remove CR characters from serial output
automation: remove com1= parameter on QEMU smoke tests
automation: add Xen timestamps to all tests
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 +- automation/build/archlinux/current-riscv64.dockerfile | 2 +- automation/build/archlinux/current.dockerfile | 2 +- automation/build/centos/7.dockerfile | 2 +- .../build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 2 +- automation/build/debian/bookworm-arm64v8.dockerfile | 2 +- automation/build/debian/bookworm-cppcheck.dockerfile | 4 ++-- automation/build/debian/bookworm-i386.dockerfile | 2 +- automation/build/debian/bookworm.dockerfile | 7 ++++++- automation/build/debian/bullseye-ppc64le.dockerfile | 2 +- automation/build/debian/buster-gcc-ibt.dockerfile | 4 ++-- 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 | 9 ++++++++- 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 +- automation/gitlab-ci/test.yaml | 4 ++-- automation/scripts/qemu-alpine-x86_64.sh | 7 +++++-- automation/scripts/qemu-smoke-dom0-arm32.sh | 5 +++-- automation/scripts/qemu-smoke-dom0-arm64.sh | 5 +++-- automation/scripts/qemu-smoke-dom0less-arm32.sh | 5 +++-- automation/scripts/qemu-smoke-dom0less-arm64.sh | 5 +++-- automation/scripts/qemu-smoke-riscv64.sh | 2 +- automation/scripts/qemu-smoke-x86-64.sh | 3 +-- automation/scripts/qemu-xtf-dom0less-arm64.sh | 5 +++-- automation/scripts/qubes-x86-64.sh | 4 ++-- automation/scripts/xilinx-smoke-dom0less-arm64.sh | 4 ++-- .../tests-artifacts/alpine/3.18-arm64v8.dockerfile | 2 +- automation/tests-artifacts/alpine/3.18.dockerfile | 2 +- .../tests-artifacts/kernel/5.19-arm64v8.dockerfile | 2 +- automation/tests-artifacts/kernel/6.1.19.dockerfile | 2 +- .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile | 2 +- .../qemu-system-ppc64/8.1.0-ppc64.dockerfile | 2 +- 41 files changed, 92 insertions(+), 52 deletions(-)
Signature · 1 line
2.42.0
PATCH v2 1/7 automation: remove CR characters from serial output
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 serial output file untouched.
All usages of tee are adjusted to strip CR from the output.
---
Changes since v1:
- Attempt to fix all usages of tee.
--- automation/scripts/qemu-alpine-x86_64.sh | 5 ++++- automation/scripts/qemu-smoke-dom0-arm32.sh | 3 ++- automation/scripts/qemu-smoke-dom0-arm64.sh | 3 ++- automation/scripts/qemu-smoke-dom0less-arm32.sh | 3 ++- automation/scripts/qemu-smoke-dom0less-arm64.sh | 3 ++- automation/scripts/qemu-smoke-riscv64.sh | 2 +- automation/scripts/qemu-xtf-dom0less-arm64.sh | 3 ++- automation/scripts/qubes-x86-64.sh | 2 +- automation/scripts/xilinx-smoke-dom0less-arm64.sh | 2 +- 9 files changed, 17 insertions(+), 9 deletions(-)
automation/scripts/qemu-alpine-x86_64.sh +4 -1
@@ -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
automation/scripts/qemu-smoke-dom0-arm32.sh +2 -1
@@ -91,7 +91,8 @@ timeout -k 1 720 \ -no-reboot \ -device virtio-net-pci,netdev=n0 \ -netdev user,id=n0,tftp=./ \ - -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee ${serial_log} + -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& \ + tee ${serial_log} | sed 's/\r//' set -e (grep -q "Domain-0" ${serial_log} && grep -q "^/ #" ${serial_log}) || exit 1
automation/scripts/qemu-smoke-dom0-arm64.sh +2 -1
@@ -104,7 +104,8 @@ timeout -k 1 720 \ -no-reboot \ -device virtio-net-pci,netdev=n0 \ -netdev user,id=n0,tftp=binaries \ - -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& tee smoke.serial + -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& \ + tee smoke.serial | sed 's/\r//' set -e (grep -q "Domain-0" smoke.serial && grep -q "BusyBox" smoke.serial) || exit 1
automation/scripts/qemu-smoke-dom0less-arm32.sh +2 -1
@@ -137,7 +137,8 @@ timeout -k 1 240 \ -no-reboot \ -device virtio-net-pci,netdev=n0 \ -netdev user,id=n0,tftp=./ \ - -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& tee ${serial_log} + -bios /usr/lib/u-boot/qemu_arm/u-boot.bin |& \ + tee ${serial_log} | sed 's/\r//' set -e (grep -q "${dom0_prompt}" ${serial_log} && grep -q "${passed}" ${serial_log}) || exit 1
automation/scripts/qemu-smoke-dom0less-arm64.sh +2 -1
@@ -201,7 +201,8 @@ timeout -k 1 240 \ -no-reboot \ -device virtio-net-pci,netdev=n0 \ -netdev user,id=n0,tftp=binaries \ - -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& tee smoke.serial + -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& \ + tee smoke.serial | sed 's/\r//' set -e (grep -q "^Welcome to Alpine Linux" smoke.serial && grep -q "${passed}" smoke.serial) || exit 1
automation/scripts/qemu-smoke-riscv64.sh +1 -1
@@ -13,7 +13,7 @@ qemu-system-riscv64 \ -nographic \ -m 2g \ -kernel binaries/xen \ - |& tee smoke.serial + |& tee smoke.serial | sed 's/\r//' set -e (grep -q "All set up" smoke.serial) || exit 1
automation/scripts/qemu-xtf-dom0less-arm64.sh +2 -1
@@ -61,7 +61,8 @@ timeout -k 1 120 \ -no-reboot \ -device virtio-net-pci,netdev=n0 \ -netdev user,id=n0,tftp=binaries \ - -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& tee smoke.serial + -bios /usr/lib/u-boot/qemu_arm64/u-boot.bin |& \ + tee smoke.serial | sed 's/\r//' set -e (grep -q "${passed}" smoke.serial) || exit 1
automation/scripts/qubes-x86-64.sh +1 -1
@@ -200,7 +200,7 @@ cp -f binaries/dom0-rootfs.cpio.gz $TFTP/initrd-dom0 # the console mkfifo /tmp/console-stdin cat /tmp/console-stdin |\ -ssh $CONTROLLER console | tee smoke.serial & +ssh $CONTROLLER console | tee smoke.serial | sed 's/\r//' & # start the system pointing at gitlab-ci predefined config ssh $CONTROLLER gitlabci poweron
automation/scripts/xilinx-smoke-dom0less-arm64.sh +1 -1
@@ -136,7 +136,7 @@ cd $START # connect to serial set +e stty -F /dev/ttyUSB0 115200 -timeout -k 1 120 nohup sh -c "cat /dev/ttyUSB0 | tee smoke.serial" +timeout -k 1 120 nohup sh -c "cat /dev/ttyUSB0 | tee smoke.serial | sed 's/\r//'" # stop the board cd /scratch/gitlab-runner
Signature · 1 line
2.42.0
PATCH v2 2/7 automation: remove com1= parameter on QEMU smoke tests
In reply to Roger Pau MonneThe serial is already setup by the firmware, be consistent with the rest of the QEMU tests and don't specify a com1 setup.
Note it's also bogus, as the extra ',' will make the intended DPS argument to be parsed as the io-base.
---
Changes in v2:
- New in this version
--- automation/scripts/qemu-smoke-x86-64.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
automation/scripts/qemu-smoke-x86-64.sh +1 -2
@@ -19,8 +19,7 @@ set +e timeout -k 1 30 \ qemu-system-x86_64 -nographic -kernel binaries/xen \ -initrd xtf/tests/example/$k \ - -append "loglvl=all com1=115200,,8n1 console=com1 noreboot \ - console_timestamps=boot $extra" \ + -append "loglvl=all console=com1 noreboot console_timestamps=boot $extra" \ -m 512 -monitor none -serial file:smoke.serial set -e grep -q 'Test result: SUCCESS' smoke.serial || exit 1
Signature · 1 line
2.42.0
Re: [PATCH v2 2/7] automation: remove com1= parameter on QEMU smoke tests
Quoted 7 lines · Roger Pau Monne
The serial is already setup by the firmware, be consistent with the rest of the QEMU tests and don't specify a com1 setup.
Note it's also bogus, as the extra ',' will make the intended DPS argument to be parsed as the io-base.
Signed-off-by Roger Pau Monné <[email protected]>
Quoted 24 lines
---
Changes in v2:
- New in this version--- automation/scripts/qemu-smoke-x86-64.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)automation/scripts/qemu-smoke-x86-64.sh +1
-2@@ -19,8 +19,7 @@ set +e timeout -k 1 30 \ qemu-system-x86_64 -nographic -kernel binaries/xen \ -initrd xtf/tests/example/$k \ - -append "loglvl=all com1=115200,,8n1 console=com1 noreboot \ - console_timestamps=boot $extra" \ + -append "loglvl=all console=com1 noreboot console_timestamps=boot $extra" \ -m 512 -monitor none -serial file:smoke.serial set -e grep -q 'Test result: SUCCESS' smoke.serial || exit 1Signature · 1 line
2.42.0
PATCH v2 3/7 automation: add Xen timestamps to all tests
In reply to Roger Pau Monne---
Changes since v1:
- Expand to all tests.
--- automation/scripts/qemu-alpine-x86_64.sh | 2 +- automation/scripts/qemu-smoke-dom0-arm32.sh | 2 +- automation/scripts/qemu-smoke-dom0-arm64.sh | 2 +- automation/scripts/qemu-smoke-dom0less-arm32.sh | 2 +- automation/scripts/qemu-smoke-dom0less-arm64.sh | 2 +- automation/scripts/qemu-xtf-dom0less-arm64.sh | 2 +- automation/scripts/qubes-x86-64.sh | 2 +- automation/scripts/xilinx-smoke-dom0less-arm64.sh | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
automation/scripts/qemu-alpine-x86_64.sh +1 -1
@@ -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
automation/scripts/qemu-smoke-dom0-arm32.sh +1 -1
@@ -63,7 +63,7 @@ XEN="xen-qemuarm" DOM0_KERNEL="zImage" DOM0_RAMDISK="initrd.gz" DOM0_CMD="console=hvc0 earlyprintk clk_ignore_unused root=/dev/ram0 rdinit=/sbin/init" -XEN_CMD="console=dtuart dom0_mem=1024M bootscrub=0" +XEN_CMD="console=dtuart dom0_mem=1024M bootscrub=0 console_timestamps=boot" NUM_DOMUS=0
automation/scripts/qemu-smoke-dom0-arm64.sh +1 -1
@@ -79,7 +79,7 @@ DEVICE_TREE="virt-gicv2.dtb" XEN="xen" DOM0_KERNEL="Image" DOM0_RAMDISK="xen-rootfs.cpio.gz" -XEN_CMD="console=dtuart dom0_mem=1024M" +XEN_CMD="console=dtuart dom0_mem=1024M console_timestamps=boot" NUM_DOMUS=0
automation/scripts/qemu-smoke-dom0less-arm32.sh +1 -1
@@ -89,7 +89,7 @@ MEMORY_END="0xC0000000" DEVICE_TREE="virt.dtb" XEN="xen" -XEN_CMD="console=dtuart dom0_mem=512M bootscrub=0" +XEN_CMD="console=dtuart dom0_mem=512M bootscrub=0 console_timestamps=boot" DOM0_KERNEL="vmlinuz" DOM0_RAMDISK="initrd.gz"
automation/scripts/qemu-smoke-dom0less-arm64.sh +1 -1
@@ -137,7 +137,7 @@ DEVICE_TREE="virt-gicv2.dtb" XEN="xen" DOM0_KERNEL="Image" DOM0_RAMDISK="dom0-rootfs.cpio.gz" -XEN_CMD="console=dtuart dom0_mem=512M" +XEN_CMD="console=dtuart dom0_mem=512M console_timestamps=boot" NUM_DOMUS=1 DOMU_KERNEL[0]="Image"
automation/scripts/qemu-xtf-dom0less-arm64.sh +1 -1
@@ -33,7 +33,7 @@ MEMORY_END="0xC0000000" XEN="xen" DEVICE_TREE="virt-gicv2.dtb" -XEN_CMD="console=dtuart" +XEN_CMD="console=dtuart console_timestamps=boot" DOMU_KERNEL[0]="xtf-test" DOMU_MEM[0]="128"
automation/scripts/qubes-x86-64.sh +1 -1
@@ -185,7 +185,7 @@ TFTP=/scratch/gitlab-runner/tftp [email protected] echo " -multiboot2 (http)/gitlab-ci/xen $CONSOLE_OPTS loglvl=all guest_loglvl=all dom0_mem=4G $extra_xen_opts +multiboot2 (http)/gitlab-ci/xen $CONSOLE_OPTS loglvl=all guest_loglvl=all dom0_mem=4G console_timestamps=boot $extra_xen_opts module2 (http)/gitlab-ci/vmlinuz console=hvc0 root=/dev/ram0 earlyprintk=xen module2 (http)/gitlab-ci/initrd-dom0 " > $TFTP/grub.cfg
automation/scripts/xilinx-smoke-dom0less-arm64.sh +1 -1
@@ -94,7 +94,7 @@ DEVICE_TREE="mpsoc_smmu.dtb" XEN="xen" DOM0_KERNEL="Image" DOM0_RAMDISK="dom0-rootfs.cpio.gz" -XEN_CMD="console=dtuart dtuart=serial0 dom0_mem=1024M" +XEN_CMD="console=dtuart dtuart=serial0 dom0_mem=1024M console_timestamps=boot" NUM_DOMUS=1 DOMU_KERNEL[0]="Image"
Signature · 1 line
2.42.0
PATCH v2 4/7 automation: fix jessie/stretch images to use archive.debian.org apt repos
In reply to Roger Pau MonneOtherwise 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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH v2 5/7 automation: update tests to use Debian Bookworm
In reply to Roger Pau MonneSwitch 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
@@ -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
@@ -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
PATCH v2 6/7 automation: set architecture in docker files
In reply to Roger Pau MonnePass 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 | 4 ++-- 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 +- automation/tests-artifacts/alpine/3.18.dockerfile | 2 +- automation/tests-artifacts/kernel/6.1.19.dockerfile | 2 +- .../tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-)
automation/build/alpine/3.18.dockerfile +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 +2 -2
@@ -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
@@ -41,7 +41,7 @@ RUN ./configure \ RUN make -j`nproc` && make -j`nproc` install -FROM debian:buster-slim +FROM --platform=linux/amd64 debian:buster-slim COPY --from=builder /opt/gcc-11-ibt /opt/gcc-11-ibt LABEL maintainer.name="The Xen Project" \
automation/build/debian/jessie.dockerfile +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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/tests-artifacts/alpine/3.18.dockerfile +1 -1
@@ -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/tests-artifacts/kernel/6.1.19.dockerfile +1 -1
@@ -1,4 +1,4 @@ -FROM debian:bookworm +FROM --platform=linux/amd64 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="[email protected]"
automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile +1 -1
@@ -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]"
Signature · 1 line
2.42.0
Re: [PATCH v2 6/7] automation: set architecture in docker files
Quoted 8 lines · 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.
Signed-off-by Roger Pau Monné <[email protected]>
Quoted 237 lines
---
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 | 4 ++-- 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 +- automation/tests-artifacts/alpine/3.18.dockerfile | 2 +- automation/tests-artifacts/kernel/6.1.19.dockerfile | 2 +- .../tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-)automation/build/alpine/3.18.dockerfile +1
-1@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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 +2
-2@@ -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@@ -41,7 +41,7 @@ RUN ./configure \ RUN make -j`nproc` && make -j`nproc` install -FROM debian:buster-slim +FROM --platform=linux/amd64 debian:buster-slim COPY --from=builder /opt/gcc-11-ibt /opt/gcc-11-ibt LABEL maintainer.name="The Xen Project" \automation/build/debian/jessie.dockerfile +1
-1@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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@@ -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/tests-artifacts/alpine/3.18.dockerfile +1
-1@@ -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/tests-artifacts/kernel/6.1.19.dockerfile +1
-1@@ -1,4 +1,4 @@ -FROM debian:bookworm +FROM --platform=linux/amd64 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="[email protected]"automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile +1
-1@@ -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]"Signature · 1 line
2.42.0
PATCH v2 7/7 automation: switch to multi-platform images when possible
In reply to Roger Pau MonneInstead 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 | 4 ++-- automation/build/debian/bookworm-i386.dockerfile | 2 +- automation/build/debian/stretch-i386.dockerfile | 2 +- automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile | 2 +- automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile | 2 +- .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-)
automation/build/alpine/3.18-arm64v8.dockerfile +1 -1
@@ -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
@@ -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
@@ -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 +2 -2
@@ -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
@@ -24,7 +24,7 @@ RUN curl -fsSLO https://github.com/danmar/cppcheck/archive/"$CPPCHECK_VERSION".t FILESDIR=/usr/share/cppcheck \ HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" -FROM arm64v8/debian:bookworm +FROM --platform=linux/arm64/v8 debian:bookworm COPY --from=builder /usr/bin/cppcheck /usr/bin/cppcheck COPY --from=builder /usr/share/cppcheck /usr/share/cppcheck
automation/build/debian/bookworm-i386.dockerfile +1 -1
@@ -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
@@ -1,4 +1,4 @@ -FROM i386/debian:stretch +FROM --platform=linux/i386 debian:stretch LABEL maintainer.name="The Xen Project" \ maintainer.email="[email protected]"
automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile +1 -1
@@ -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/tests-artifacts/kernel/5.19-arm64v8.dockerfile +1 -1
@@ -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/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile +1 -1
@@ -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]"
Signature · 1 line
2.42.0
Re: [PATCH v2 7/7] automation: switch to multi-platform images when possible
Quoted 4 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.
Signed-off-by Roger Pau Monné <[email protected]>
Quoted 116 lines
---
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 | 4 ++-- automation/build/debian/bookworm-i386.dockerfile | 2 +- automation/build/debian/stretch-i386.dockerfile | 2 +- automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile | 2 +- automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile | 2 +- .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-)automation/build/alpine/3.18-arm64v8.dockerfile +1
-1@@ -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@@ -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@@ -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 +2
-2@@ -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@@ -24,7 +24,7 @@ RUN curl -fsSLO https://github.com/danmar/cppcheck/archive/"$CPPCHECK_VERSION".t FILESDIR=/usr/share/cppcheck \ HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" -FROM arm64v8/debian:bookworm +FROM --platform=linux/arm64/v8 debian:bookworm COPY --from=builder /usr/bin/cppcheck /usr/bin/cppcheck COPY --from=builder /usr/share/cppcheck /usr/share/cppcheckautomation/build/debian/bookworm-i386.dockerfile +1
-1@@ -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@@ -1,4 +1,4 @@ -FROM i386/debian:stretch +FROM --platform=linux/i386 debian:stretch LABEL maintainer.name="The Xen Project" \ maintainer.email="[email protected]"automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile +1
-1@@ -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/tests-artifacts/kernel/5.19-arm64v8.dockerfile +1
-1@@ -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/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile +1
-1@@ -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]"Signature · 1 line
2.42.0