From 4a2408289c0a714fa57fa5921cf5dba518149637 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Tue, 21 Nov 2023 15:37:49 -0500 Subject: [PATCH] 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 --- src/syscall/exec_linux_test.go | 3 +++ 1 file changed, 3 insertions(+) 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) } } -- 2.48.1