]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/vsock: skip vng setsid workaround on >= 1.41
authorBobby Eshleman <bobbyeshleman@meta.com>
Fri, 12 Jun 2026 19:08:42 +0000 (12:08 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 19:52:01 +0000 (12:52 -0700)
virtme-ng 1.41 ships the upstream fix for the SIGTTOU hang
(https://github.com/arighi/virtme-ng/pull/453), so the setsid wrapper in
vng_dry_run() is no longer needed there. Gate the workaround on the vng
version: setsid is used for vng < 1.41, and vng is invoked directly on
>= 1.41.

Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>
Link: https://patch.msgid.link/20260612-vsock-test-update-v1-2-7d7eeed3ac8f@meta.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/vsock/vmtest.sh

index ee69ac9dd3dc6e16ae47389bc8a332c8cf12b8e7..310dfc2a39ad572d01f9c8b5ba523a3d3174b3e1 100755 (executable)
@@ -445,8 +445,14 @@ vng_dry_run() {
        # stopped with SIGTTOU and hangs until kselftest's timer expires.
        # setsid works around this by launching vng in a new session that has
        # no controlling terminal, so tcsetattr() succeeds.
+       #
+       # Fixed in 1.41 (https://github.com/arighi/virtme-ng/pull/453).
 
-       setsid -w vng --run "$@" --dry-run &>/dev/null
+       if version_lt "$(vng --version | awk '{print $2}')" "1.41"; then
+               setsid -w vng --run "$@" --dry-run &>/dev/null
+       else
+               vng --run "$@" --dry-run &>/dev/null
+       fi
 }
 
 vm_start() {