diff options
Diffstat (limited to 'src/syscall/exec_pdeathsig_test.go')
| -rw-r--r-- | src/syscall/exec_pdeathsig_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/syscall/exec_pdeathsig_test.go b/src/syscall/exec_pdeathsig_test.go index 96ae27b494..46ce33443d 100644 --- a/src/syscall/exec_pdeathsig_test.go +++ b/src/syscall/exec_pdeathsig_test.go @@ -9,6 +9,7 @@ package syscall_test import ( "bufio" "fmt" + "internal/testenv" "io" "os" "os/exec" @@ -23,6 +24,13 @@ func TestDeathSignal(t *testing.T) { if os.Getuid() != 0 { t.Skip("skipping root only test") } + if testing.Short() && testenv.Builder() != "" && os.Getenv("USER") == "swarming" { + // The Go build system's swarming user is known not to be root. + // Unfortunately, it sometimes appears as root due the current + // implementation of a no-network check using 'unshare -n -r'. + // Since this test does need root to work, we need to skip it. + t.Skip("skipping root only test on a non-root builder") + } // Copy the test binary to a location that a non-root user can read/execute // after we drop privileges |
