summaryrefslogtreecommitdiffstats
path: root/test/test-functions
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2021-08-09 14:32:43 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2021-08-09 23:12:18 +0200
commit46db176f8c34adc47f535904e834d18c8ad53f5f (patch)
treeb907501da5268d0c0b4ed0ff1bd7850b785916f7 /test/test-functions
parenttimesync: add option to periodically save time (diff)
downloadsystemd-46db176f8c34adc47f535904e834d18c8ad53f5f.tar.xz
systemd-46db176f8c34adc47f535904e834d18c8ad53f5f.zip
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.
Diffstat (limited to 'test/test-functions')
-rw-r--r--test/test-functions12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/test-functions b/test/test-functions
index 1ad6220efc..abe421c505 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