mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-20 16:29:07 +08:00
ci: don't hang on kernel crashes in qemu
Backport of kernel-patches PR ([0]), done by @thefallentree. [0] https://github.com/kernel-patches/vmtest/pull/29 Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This commit is contained in:
committed by
Andrii Nakryiko
parent
8bdc267e7b
commit
c92a5d043e
@@ -459,10 +459,10 @@ if kvm-ok ; then
|
||||
else
|
||||
accel="-cpu qemu64 -machine accel=tcg"
|
||||
fi
|
||||
qemu-system-x86_64 -nodefaults -display none -serial mon:stdio \
|
||||
qemu-system-x86_64 -nodefaults -display none -serial mon:stdio -no-reboot \
|
||||
${accel} -smp "$(nproc)" -m 4G \
|
||||
-drive file="$IMG",format=raw,index=1,media=disk,if=virtio,cache=none \
|
||||
-kernel "$vmlinuz" -append "root=/dev/vda rw console=ttyS0,115200$APPEND"
|
||||
-kernel "$vmlinuz" -append "root=/dev/vda rw console=ttyS0,115200 kernel.panic=-1 $APPEND"
|
||||
sudo mount -o loop "$IMG" "$mnt"
|
||||
if exitstatus="$(cat "$mnt/exitstatus" 2>/dev/null)"; then
|
||||
printf '\nTests exit status: %s\n' "$exitstatus" >&2
|
||||
|
||||
Reference in New Issue
Block a user