1
0
mirror of https://github.com/golang/go synced 2024-09-29 19:24:33 -06:00

syscall: check SyscallIsNotSupported in TestPidFDWithUserNS

For #51246.

Change-Id: Ief2e2e14f039123a6580cb60be7ee74f4a20a649
Reviewed-on: https://go-review.googlesource.com/c/go/+/544318
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Michael Pratt 2023-11-21 15:37:49 -05:00 committed by Gopher Robot
parent 41f58b2295
commit 4a2408289c

View File

@ -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)
}
}