From: Bobby Eshleman Date: Sat, 8 Nov 2025 16:00:56 +0000 (-0800) Subject: selftests/vsock: do not unconditionally die if qemu fails X-Git-Tag: v6.19-rc1~170^2~185^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7df4adc0679afa2da47c13cbf7960a26e0fe7cb;p=thirdparty%2Fkernel%2Flinux.git selftests/vsock: do not unconditionally die if qemu fails If QEMU fails to boot, then set the returncode (via timeout) instead of unconditionally dying. This is in preparation for tests that expect QEMU to fail to boot. In that case, we just want to know if the boot failed or not so we can test the pass/fail criteria, and continue executing the next test. Reviewed-by: Simon Horman Signed-off-by: Bobby Eshleman Reviewed-by: Stefano Garzarella Link: https://patch.msgid.link/20251108-vsock-selftests-fixes-and-improvements-v4-5-d5e8d6c87289@meta.com Signed-off-by: Jakub Kicinski --- diff --git a/tools/testing/selftests/vsock/vmtest.sh b/tools/testing/selftests/vsock/vmtest.sh index 13b685280a67c..6889bdb8a31c5 100755 --- a/tools/testing/selftests/vsock/vmtest.sh +++ b/tools/testing/selftests/vsock/vmtest.sh @@ -236,10 +236,8 @@ vm_start() { --append "${KERNEL_CMDLINE}" \ --rw &> ${logfile} & - if ! timeout ${WAIT_TOTAL} \ - bash -c 'while [[ ! -s '"${pidfile}"' ]]; do sleep 1; done; exit 0'; then - die "failed to boot VM" - fi + timeout "${WAIT_TOTAL}" \ + bash -c 'while [[ ! -s '"${pidfile}"' ]]; do sleep 1; done; exit 0' } vm_wait_for_ssh() {