From 955f99e3ba60f43978f732804bbacdadbf1d8950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfonso=20S=C3=A1nchez-Beato?= Date: Tue, 12 Nov 2024 10:02:17 -0500 Subject: [PATCH] tests: properly inject kernel failure for UC24 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. --- tests/lib/prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/prepare.sh b/tests/lib/prepare.sh index 6dc9dd68098..4660e463801 100755 --- a/tests/lib/prepare.sh +++ b/tests/lib/prepare.sh @@ -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