]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: check SyscallIsNotSupported in TestPidFDWithUserNS
authorMichael Pratt <mpratt@google.com>
Tue, 21 Nov 2023 20:37:49 +0000 (15:37 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 21 Nov 2023 21:40:03 +0000 (21:40 +0000)
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>

src/syscall/exec_linux_test.go

index a7af00d2c00a618d18ec7cec61d1a07386ac0e31..976275e1dcf3bc2471a2a835b2c52895c0122652 100644 (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)
        }
 }