Commit 7a4d0238 authored by Elias Naur's avatar Elias Naur

syscall: accept permission errors in TestExecPtrace

Fixes the test on the linux-arm64-packet builder.

Change-Id: Icaf9edf9542f4f6e3791ca43298a1e7051eaa576
Reviewed-on: https://go-review.googlesource.com/c/go/+/182378
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 06e34e58
......@@ -28,8 +28,10 @@ func TestExecPtrace(t *testing.T) {
},
}
proc, err := os.StartProcess(bin, []string{bin}, attr)
if err != nil {
if err == nil {
proc.Kill()
}
if err != nil && !os.IsPermission(err) {
t.Fatalf("StartProcess with ptrace enabled failed: %v", err)
}
proc.Kill()
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment