Skip to content

Commit

Permalink
tests: properly inject kernel failure for UC24
Browse files Browse the repository at this point in the history
We were just appending to the snap-bootstrap binary instead of
replacing it. Fixes
google-nested:ubuntu-24.04-64:tests/nested/core/core20-kernel-failover:crash.
  • Loading branch information
alfonsosanchezbeato authored and Meulengracht committed Nov 13, 2024
1 parent 7fedf7e commit 955f99e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/lib/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ uc24_build_initramfs_kernel_snap() {
chmod +x ./initrd/main/usr/lib/snapd/snap-bootstrap
if [ "$injectKernelPanic" = "true" ]; then
# add a kernel panic to the end of the-tool execution
echo "echo 'forcibly panicking'; echo c > /proc/sysrq-trigger" >> ./initrd/main/usr/lib/snapd/snap-bootstrap
echo "echo 'forcibly panicking'; echo c > /proc/sysrq-trigger" > ./initrd/main/usr/lib/snapd/snap-bootstrap
fi

(cd ./initrd/early; find . | cpio --create --quiet --format=newc --owner=0:0) >initrd.img
Expand Down

0 comments on commit 955f99e

Please sign in to comment.