From 46db176f8c34adc47f535904e834d18c8ad53f5f Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 9 Aug 2021 14:32:43 +0200 Subject: [PATCH] test: use a correct kernel binary on ppc64le machines Ubuntu calls the kernel binary as `vmlinux-*`, but RHEL/CentOS uses the "standard" `vmlinuz-` prefix. Follow-up to eaa602cb14217f2623c9c8c44b6f3012dc4d0b24. --- test/test-functions | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/test-functions b/test/test-functions index 1ad6220efc6..abe421c505c 100644 --- a/test/test-functions +++ b/test/test-functions @@ -347,12 +347,14 @@ run_qemu() { [ "$ARCH" ] || ARCH=$(uname -m) case $ARCH in ppc64*) - KERNEL_BIN="/boot/vmlinux-$KERNEL_VER" - CONSOLE=hvc0 - ;; + # Ubuntu ppc64* calls the kernel binary as vmlinux-*, RHEL/CentOS + # uses the "standard" vmlinuz- prefix + [[ -e "/boot/vmlinux-$KERNEL_VER" ]] && KERNEL_BIN="/boot/vmlinux-$KERNEL_VER" || KERNEL_BIN="/boot/vmlinuz-$KERNEL_VER" + CONSOLE=hvc0 + ;; *) - KERNEL_BIN="/boot/vmlinuz-$KERNEL_VER" - ;; + KERNEL_BIN="/boot/vmlinuz-$KERNEL_VER" + ;; esac fi fi