Skip to content

Commit

Permalink
lib/tests/kernel-selftests.sh: log extra info when fixup_kexec() fails
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Oct 29, 2024
1 parent a9367d2 commit 7bdf8fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/tests/kernel-selftests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,12 @@ fixup_kexec()
local kernel_image=/boot/vmlinuz-$(uname -r)
[[ -e $kernel_image ]] || {
kernel_image=/opt/rootfs/tmp$(grep -o "/pkg/linux/.*/vmlinuz-[^ ]*" /proc/cmdline)
[[ -e $kernel_image ]] && sed -i "s|/boot/vmlinuz-\`uname -r\`|$kernel_image|g" kexec/kexec_common_lib.sh
[[ -e $kernel_image ]] || {
echo "kernel image $kernel_image doesn't exist"
return 1
}

sed -i "s|/boot/vmlinuz-\`uname -r\`|$kernel_image|g" kexec/kexec_common_lib.sh
}
}

Expand Down

0 comments on commit 7bdf8fe

Please sign in to comment.