]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use a correct kernel binary on ppc64le machines
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 9 Aug 2021 12:32:43 +0000 (14:32 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 9 Aug 2021 21:12:18 +0000 (22:12 +0100)
Ubuntu calls the kernel binary as `vmlinux-*`, but RHEL/CentOS uses
the "standard" `vmlinuz-` prefix.

Follow-up to eaa602cb14217f2623c9c8c44b6f3012dc4d0b24.

test/test-functions

index 1ad6220efc69cc6d34dc4c9dd48986b9123e4bbc..abe421c505c0c5f322f92353418fc520949b7885 100644 (file)
@@ -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