From: Michael Pratt Date: Tue, 21 Nov 2023 20:37:49 +0000 (-0500) Subject: syscall: check SyscallIsNotSupported in TestPidFDWithUserNS X-Git-Tag: go1.22rc1~183 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4a2408289c0a714fa57fa5921cf5dba518149637;p=gostls13.git syscall: check SyscallIsNotSupported in TestPidFDWithUserNS For #51246. Change-Id: Ief2e2e14f039123a6580cb60be7ee74f4a20a649 Reviewed-on: https://go-review.googlesource.com/c/go/+/544318 TryBot-Result: Gopher Robot Auto-Submit: Michael Pratt Reviewed-by: Bryan Mills Run-TryBot: Michael Pratt LUCI-TryBot-Result: Go LUCI --- diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go index a7af00d2c0..976275e1dc 100644 --- a/src/syscall/exec_linux_test.go +++ b/src/syscall/exec_linux_test.go @@ -582,6 +582,9 @@ func TestPidFD(t *testing.T) { func TestPidFDWithUserNS(t *testing.T) { if err := testPidFD(t, true); err != nil { + if testenv.SyscallIsNotSupported(err) { + t.Skip("userns not supported:", err) + } t.Fatal("can't start a process:", err) } }