]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
ci: optimize test containers
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 2 Nov 2024 04:35:34 +0000 (00:35 -0400)
committerLaszlo <laszlo.gombos@gmail.com>
Sat, 2 Nov 2024 12:15:00 +0000 (08:15 -0400)
Make containers more intentional and optimized without
loosing test coverage.

Add documentation for each container.

test/container/Dockerfile-alpine
test/container/Dockerfile-arch
test/container/Dockerfile-debian
test/container/Dockerfile-fedora
test/container/Dockerfile-gentoo
test/container/Dockerfile-opensuse
test/container/Dockerfile-ubuntu
test/container/Dockerfile-void

index af07d97ad2ce5fb1cfd3f437ef68fc0ea18ce282..35acb073985bf4e7fb8149c682bd602636c41a09 100644 (file)
@@ -1,50 +1,49 @@
+# Test coverage provided by this container:
+# - hostonly
+# - musl (instead of glibc)
+# - openrc (instead of systemd)
+# - eudev (instead of systemd-udev)
+# - elogind (instead of logind)
+# - busybox default shell (no dash installed)
+# - lzma compression (provided by busybox)
+# - clang
+
+# Not installed
+# - cargo (to increase coverage)
+# - dash (to increase coverage)
+# - ntfs-3g (not enabled with linux-virt)
+# - erofs-utils (not enabled with linux-virt)
+# - multipath-tools (does not work well)
+# - ovmf (systemd-boot-efistub is not available)
+# - networkmanager (does not work with dracut)
+
 ARG DISTRIBUTION=alpine
 FROM docker.io/${DISTRIBUTION}
 
-# run tests with clang
 ENV CC=clang
 
-# ovmf is not installed as systemd-boot-efistub is not available
-# see https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/61369
-
-# dash is not installed to run test suite only with busybox and bash
-# (without requiring dash)
-
-# ntfs-3g and erofs-utils not installed as the corresponding kernel
-# modules are not enabled with linux-virt
-
-# multipath-tools is not installed as it does not work well
-
-# cargo is not installed only in this container to test packaging without cargo
-
 RUN apk add --no-cache \
     asciidoc \
     bash \
     binutils \
     blkid \
     btrfs-progs \
-    busybox \
-    bzip2 \
     clang \
     coreutils \
     cpio \
     cryptsetup \
-    curl \
     device-mapper \
     dhclient \
     dmraid \
-    dosfstools \
     dracut \
     e2fsprogs \
     elogind \
     eudev \
     file \
     findmnt \
-    f2fs-tools \
     gpg \
     grep \
     iputils \
-    jfsutils \
     jq \
     kbd \
     keyutils \
@@ -56,15 +55,10 @@ RUN apk add --no-cache \
     lvm2 \
     make \
     mdadm \
-    mtools \
     musl-fts-dev \
-    nbd \
     nvme-cli \
-    open-iscsi \
-    openssh \
     parted \
     partx \
-    pigz \
     plymouth-themes \
     procps \
     qemu-img \
@@ -73,10 +67,7 @@ RUN apk add --no-cache \
     sed \
     sfdisk \
     squashfs-tools \
-    swtpm \
-    util-linux-misc \
-    xfsprogs \
-    xz
+    util-linux-misc
 
 # workaround for --enable-split-usr
 # see https://github.com/eudev-project/eudev/pull/246
index 536b1237b329bfd8f34421adb46c9f2618b234c1..29e25e35afbc7f2cb2d9e8aed322ee2676055854 100644 (file)
@@ -1,3 +1,15 @@
+# Test coverage provided by this container:
+# - xfs, ntfs-3g
+# - mkinitcpio, mkosi
+# - sbsigntools
+# - qrencode (systemd-bsod)
+
+# Not installed
+# - busybox (no need, tested elsewhere)
+# - cifs-utils (no need, tested elsewhere)
+# - openssh (no need, tested elsewhere)
+# - rng-tools (does not start, https://github.com/dracut-ng/dracut-ng/pull/290#issuecomment-2138184351)
+
 FROM docker.io/archlinux
 
 # prefer running tests with xfs
@@ -5,26 +17,21 @@ ENV TEST_FSTYPE=xfs
 
 RUN pacman --noconfirm -Syu \
     asciidoc \
-    base-devel \
     bluez \
     btrfs-progs \
     busybox \
     cargo \
-    cifs-utils \
-    connman \
     cpio \
     dhclient \
     dhcp \
     dmraid \
     elfutils \
     erofs-utils \
-    f2fs-tools \
-    glibc \
-    jfsutils \
+    gcc \
     jq \
     linux \
     lvm2 \
-    lzop \
+    make \
     mdadm \
     mkosi \
     multipath-tools \
@@ -35,13 +42,11 @@ RUN pacman --noconfirm -Syu \
     ntfs-3g \
     nvme-cli \
     open-iscsi \
-    openssh \
     parted \
-    pigz \
+    pkgconf \
     plymouth \
     qemu \
     qrencode \
-    rng-tools \
     sbsigntools \
     squashfs-tools \
     swtpm \
index f0c60b496c6a23707786ee69cc0a797097dc19fa..ba4b3e12c505edb085c347940a5469b4558710e3 100644 (file)
@@ -1,3 +1,15 @@
+# Test coverage provided by this container:
+# - arm64
+# - dash default shell (instead of bash)
+# - pigz compression
+# - verbose logging for tests
+
+# Not installed
+# - dmraid (no longer maintained, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056944)
+# - plymouth-themes (not yet working with dracut, https://bugs.launchpad.net/ubuntu/+source/dracut/+bug/1596220)
+# - iscsiuio, open-iscsi (not yet working with dracut, https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/2072484)
+# - busybox-static
+
 ARG DISTRIBUTION=debian
 FROM docker.io/${DISTRIBUTION}
 
@@ -7,8 +19,6 @@ ARG DISTRIBUTION
 # prefer running tests in verbose mode
 ENV V=2
 
-# dmraid is no longer maintained. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056944
-
 # Install dracut as a linux-initramfs-tool provider so that the default initramfs-tool package does not get installed
 RUN apt-get update -y -qq && apt-get upgrade -y -qq && apt-get install -y -qq --no-install-recommends dracut
 
@@ -26,21 +36,15 @@ RUN \
     asciidoc \
     bluez \
     btrfs-progs \
-    busybox-static \
-    bzip2 \
     ca-certificates \
     cargo \
-    cifs-utils \
     console-setup \
     cpio \
     cryptsetup \
-    curl \
     docbook \
     docbook-xml \
     docbook-xsl \
     erofs-utils \
-    f2fs-tools \
-    fcoe-utils \
     fdisk \
     file \
     gcc \
@@ -49,8 +53,6 @@ RUN \
     iputils-ping \
     isc-dhcp-client \
     isc-dhcp-server \
-    iscsiuio \
-    jfsutils \
     jq \
     kmod \
     libkmod-dev \
@@ -64,18 +66,14 @@ RUN \
     nfs-kernel-server \
     ntfs-3g \
     nvme-cli \
-    open-iscsi \
-    openssh-client \
     ovmf \
     parted \
     pcscd \
     pigz \
     pkg-config \
-    plymouth-themes \
     procps \
     qemu-kvm \
     rng-tools5 \
-    sbsigntool \
     squashfs-tools \
     swtpm \
     systemd-boot-efi \
@@ -87,7 +85,5 @@ RUN \
     tgt \
     thin-provisioning-tools \
     tpm2-tools \
-    xfsprogs \
-    zstd \
     && apt-get clean \
     && chmod a+r /boot/vmlinu*
index c9e75d246f7f38b8817826586102fc57a6224113..249e9ddc6c6ad1206284bec5b970791dee32f6b0 100644 (file)
@@ -1,3 +1,15 @@
+# Test coverage provided by this container:
+# - arm64
+# - hostonly
+# - memstrack
+# - ndctl (for nvdimm)
+# - fcoe-utils (Fibre Channel over Ethernet)
+# - curl (url-lib)
+# - cifs-utils (cifs)
+# - openssh (ssh-client)
+# - rsyslog (syslog)
+# - libkcapi-hmaccalc (fido)
+
 ARG DISTRIBUTION=fedora
 ARG REGISTRY=registry.fedoraproject.org
 
@@ -16,11 +28,8 @@ else \
     dhcp-client \
     dhcp-server \
     dmraid \
-    mkosi \
     nbd \
     /usr/bin/qemu-system-$(uname -m) \
-    qrencode \
-    sbsigntools \
     scsi-target-utils \
     systemd-networkd \
 ; fi
@@ -29,7 +38,6 @@ RUN dnf -y install --setopt=install_weak_deps=False \
     asciidoc \
     bash-completion \
     bluez \
-    bzip2 \
     cargo \
     cifs-utils \
     cryptsetup \
@@ -50,7 +58,6 @@ RUN dnf -y install --setopt=install_weak_deps=False \
     libkcapi-hmaccalc \
     libselinux-utils \
     lvm2 \
-    lzop \
     make \
     mdadm \
     memstrack \
@@ -60,19 +67,16 @@ RUN dnf -y install --setopt=install_weak_deps=False \
     nvme-cli \
     parted \
     pcsc-lite \
-    pigz \
     plymouth \
     qemu-kvm \
     rng-tools \
+    rsyslog \
     squashfs-tools \
     swtpm \
     systemd-boot-unsigned \
     systemd-resolved \
     systemd-ukify \
-    tar \
     tpm2-tools \
-    xfsprogs \
-    xz \
     && dnf -y update && dnf clean all
 
 # discard configurations that enforce an out-of-tree dracut module breaking CI
index a278f30ac46bebb1ba6fcc9d0b59a00e22eb4e14..a2f0d2464607d0003e8a5ab05e9eadf56dba80d6 100644 (file)
@@ -1,3 +1,14 @@
+# Test coverage provided by this container:
+# - systemd-networkd
+# - bash
+
+# Not installed
+# - NetworkManager (to increase coverage)
+# - busybox (to increase coverage)
+# - dash (to increase coverage)
+# - rng-tools (to increase coverage)
+# - ntfs3g (to keep container small)
+
 FROM docker.io/gentoo/portage:latest AS portage
 
 FROM docker.io/gentoo/stage3:systemd
@@ -24,11 +35,9 @@ RUN echo 'sys-fs/lvm2 thin lvm' >> /etc/portage/package.use/lvm2
 RUN emerge --quiet --update --deep --newuse --autounmask-continue=y --with-bdeps=y @world
 
 RUN emerge --quiet --deep --autounmask-continue=y --with-bdeps=n --noreplace \
-    app-admin/rsyslog \
     app-alternatives/bc \
     app-alternatives/cpio \
     app-arch/cpio \
-    app-crypt/sbsigntools \
     app-crypt/swtpm \
     app-crypt/tpm2-tools \
     app-emulation/qemu \
@@ -41,14 +50,10 @@ RUN emerge --quiet --deep --autounmask-continue=y --with-bdeps=n --noreplace \
     dev-lang/rust-bin \
     dev-libs/libxslt \
     dev-libs/openssl \
-    net-fs/cifs-utils \
     net-fs/nfs-utils \
     net-misc/dhcp \
     net-wireless/bluez \
-    sys-apps/biosdevname \
-    sys-apps/busybox \
     sys-apps/nvme-cli \
-    sys-apps/rng-tools \
     sys-apps/systemd \
     sys-block/nbd \
     sys-block/open-iscsi \
@@ -60,13 +65,9 @@ RUN emerge --quiet --deep --autounmask-continue=y --with-bdeps=n --noreplace \
     sys-fs/btrfs-progs \
     sys-fs/cryptsetup \
     sys-fs/dmraid \
-    sys-fs/f2fs-tools \
-    sys-fs/jfsutils \
     sys-fs/mdadm \
     sys-fs/multipath-tools \
-    sys-fs/ntfs3g \
     sys-fs/squashfs-tools \
-    sys-fs/xfsprogs \
     sys-kernel/gentoo-kernel-bin \
     sys-libs/glibc \
     sys-libs/libxcrypt \
index 5dc37701a584d836068f9b2327d2a19bc8b7c1aa..114de2c5037d14751010b63b3e31d48f6783fc90 100644 (file)
@@ -1,3 +1,7 @@
+# Test coverage provided by this container:
+# - network-legacy
+# - hmaccalc (fido)
+
 FROM registry.opensuse.org/opensuse/tumbleweed-dnf:latest
 
 # prefer running tests with btrfs
@@ -8,7 +12,6 @@ RUN dnf -y install --setopt=install_weak_deps=False \
     asciidoc \
     bash-completion \
     btrfsprogs \
-    bzip2 \
     cargo \
     cryptsetup \
     dbus-broker \
@@ -28,28 +31,23 @@ RUN dnf -y install --setopt=install_weak_deps=False \
     lvm2 \
     make \
     mdadm \
-    mkosi \
     nbd \
     NetworkManager \
     nfs-utils \
     open-iscsi \
     parted \
-    pigz \
     procps \
     python3-pefile \
     qemu-kvm \
     rng-tools \
-    sbsigntools \
     squashfs \
     swtpm \
     systemd-boot \
     systemd-experimental \
-    tar \
     tgt \
     tpm2.0-tools \
     /usr/bin/qemu-system-$(uname -m) \
     util-linux-systemd \
-    xz \
     && dnf -y update && dnf clean all
 
 # configuration in the package is not compatible
index a9aa9d0e867c441212f6d22e436defe2f18f84d9..6b7f78510a9ef1fbf186825a6dd5afe2c5c14c87 100644 (file)
@@ -1,3 +1,15 @@
+# Test coverage provided by this container:
+# - arm64
+# - dash default shell (instead of bash)
+# - pigz compression
+# - verbose logging for tests
+
+# Not installed
+# - dmraid (no longer maintained, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056944)
+# - plymouth-themes (not yet working with dracut, https://bugs.launchpad.net/ubuntu/+source/dracut/+bug/1596220)
+# - iscsiuio, open-iscsi (not yet working with dracut, https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/2072484)
+# - busybox-static
+
 ARG DISTRIBUTION=ubuntu
 FROM docker.io/${DISTRIBUTION}
 
@@ -7,10 +19,6 @@ ARG DISTRIBUTION
 # prefer running tests in verbose mode
 ENV V=2
 
-# dmraid is no longer maintained. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056944
-
-# The Linux kernel is only readable by root. See https://launchpad.net/bugs/759725
-
 # Install dracut as a linux-initramfs-tool provider so that the default initramfs-tool package does not get installed
 RUN apt-get update -y -qq && apt-get upgrade -y -qq && apt-get install -y -qq --no-install-recommends dracut
 
@@ -26,21 +34,15 @@ RUN \
     asciidoc \
     bluez \
     btrfs-progs \
-    busybox-static \
-    bzip2 \
     ca-certificates \
     cargo \
-    cifs-utils \
     console-setup \
     cpio \
     cryptsetup \
-    curl \
     docbook \
     docbook-xml \
     docbook-xsl \
     erofs-utils \
-    f2fs-tools \
-    fcoe-utils \
     fdisk \
     file \
     gcc \
@@ -49,8 +51,6 @@ RUN \
     iputils-ping \
     isc-dhcp-client \
     isc-dhcp-server \
-    iscsiuio \
-    jfsutils \
     jq \
     kmod \
     libkmod-dev \
@@ -65,18 +65,14 @@ RUN \
     nfs-kernel-server \
     ntfs-3g \
     nvme-cli \
-    open-iscsi \
-    openssh-client \
     ovmf \
     parted \
     pcscd \
     pigz \
     pkg-config \
-    plymouth-themes \
     procps \
     qemu-kvm \
     rng-tools5 \
-    sbsigntool \
     squashfs-tools \
     swtpm \
     systemd-boot-efi \
@@ -89,7 +85,5 @@ RUN \
     tgt \
     thin-provisioning-tools \
     tpm2-tools \
-    xfsprogs \
-    zstd \
     && apt-get clean \
     && chmod a+r /boot/vmlinu*
index d0145975526f70ffadec8e99c3c59a007766b061..f18490352429e21217f1a73d216b0b1cdc2ceae1 100644 (file)
@@ -1,3 +1,10 @@
+# Test coverage provided by this container:
+# - dash default shell (instead of bash)
+# - runit (instead of systemd)
+# - eudev (instead of systemd-udev)
+# - elogind (instead of logind)
+# - uki (without systemd)
+
 FROM ghcr.io/void-linux/void-glibc-full
 
 RUN xbps-install -Syu xbps && xbps-install -yu \
@@ -6,54 +13,36 @@ RUN xbps-install -Syu xbps && xbps-install -yu \
     binutils \
     btrfs-progs \
     cargo \
-    cifs-utils \
     cpio \
     cryptsetup \
-    curl \
     dhclient \
     dhcp \
     dmraid \
-    dosfstools \
     e2fsprogs \
     edk2-ovmf \
     elfutils \
     elogind \
     erofs-utils \
     eudev \
-    f2fs-tools \
     gcc \
-    glibc \
     gnupg \
     iproute2 \
     iputils \
-    jfsutils \
     jq \
     kbd \
     libkmod-devel \
     linux \
     lvm2 \
-    lzop \
     make \
     mdadm \
-    mtools \
-    nbd \
     nfs-utils \
-    ntfs-3g \
     nvme-cli \
-    open-iscsi \
-    openssh \
     parted \
-    pigz \
     pkg-config \
     plymouth \
     qemu-system-amd64 \
-    sbsigntool \
     squashfs-tools \
-    swtpm \
     systemd-boot-efistub \
     tgt \
-    tpm2-tools \
     ukify \
-    xfsprogs \
-    xz \
     && rm -rf /var/cache/xbps