From fb7d5ec4cb06b2b4435327255049e55d34301d27 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Thu, 17 Aug 2023 01:03:20 +0200 Subject: [PATCH] test: support /boot/vmlinux On the Ubuntu ppc64el architecture the kernel is named `/boot/vmlinux`. Signed-off-by: Benjamin Drung --- test/run-qemu | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/run-qemu b/test/run-qemu index 152229344..0ce27b517 100755 --- a/test/run-qemu +++ b/test/run-qemu @@ -30,14 +30,23 @@ fi KVERSION=${KVERSION-$(uname -r)} VMLINUZ="/lib/modules/${KVERSION}/vmlinuz" +if ! [ -f "$VMLINUZ" ]; then + VMLINUZ="/lib/modules/${KVERSION}/vmlinux" +fi if ! [ -f "$VMLINUZ" ]; then [[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id if [[ $MACHINE_ID ]] && { [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]]; }; then VMLINUZ="/boot/${MACHINE_ID}/$KVERSION/linux" - else + elif [ -f "/boot/vmlinuz-${KVERSION}" ]; then VMLINUZ="/boot/vmlinuz-${KVERSION}" + elif [ -f "/boot/vmlinux-${KVERSION}" ]; then + VMLINUZ="/boot/vmlinux-${KVERSION}" + else + echo "Could not find a Linux kernel version $KVERSION to test with!" >&2 + echo "Please install linux." >&2 + exit 1 fi fi -- 2.47.2