From d9497f3c2fa3d8f723f98dfa239a2e176db21132 Mon Sep 17 00:00:00 2001 From: Jo Zzsi Date: Sat, 19 Oct 2024 19:42:03 -0400 Subject: [PATCH] ci: remove remaining workarounds from the alpine container Reorganize VMLINUZ detection to make the test pass again on alpine after the container change. --- test/container/Dockerfile-alpine | 5 ----- test/test-functions | 16 ++++++++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/test/container/Dockerfile-alpine b/test/container/Dockerfile-alpine index bacc29e1f..c53a20c05 100644 --- a/test/container/Dockerfile-alpine +++ b/test/container/Dockerfile-alpine @@ -74,8 +74,3 @@ RUN apk add --no-cache \ util-linux-misc \ xfsprogs \ xz - -RUN \ - cp /usr/lib/udev/rules.d/* /lib/udev/rules.d/ && \ - ln -sf /sbin/poweroff /sbin/shutdown && \ - ln -sf /boot/vmlinuz-virt /boot/vmlinuz-$(cd /lib/modules; ls -1 | tail -1) diff --git a/test/test-functions b/test/test-functions index 429c615d2..40f8d6a59 100644 --- a/test/test-functions +++ b/test/test-functions @@ -71,8 +71,6 @@ if ! [ -f "$VMLINUZ" ]; then VMLINUZ="/lib/modules/${KVERSION}/vmlinux" fi -[ -z "$VMLINUZ" ] && VMLINUZ=$(find /boot/vmlinuz-* -type f 2> /dev/null | tail -1) - if ! [ -f "$VMLINUZ" ]; then [[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id @@ -84,13 +82,19 @@ if ! [ -f "$VMLINUZ" ]; then VMLINUZ="/boot/vmlinux-${KVERSION}" elif [ -f "/boot/kernel-${KVERSION}" ]; then VMLINUZ="/boot/kernel-${KVERSION}" - else - echo "Could not find a Linux kernel version $KVERSION to test with!" >&2 - echo "Please install linux." >&2 - exit 1 fi fi +if ! [ -f "$VMLINUZ" ]; then + VMLINUZ=$(find /boot/vmlinuz-* -type f 2> /dev/null | tail -1) +fi + +if ! [ -f "$VMLINUZ" ]; then + echo "Could not find a Linux kernel version $KVERSION to test with!" >&2 + echo "Please install linux." >&2 + exit 1 +fi + export VMLINUZ command -v test_check &> /dev/null || test_check() {