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: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/syscall/syscall_ptrace_test.go b/src/syscall/syscall_ptrace_test.go
index dd1f084..6b7f54d 100644
--- a/src/syscall/syscall_ptrace_test.go
+++ b/src/syscall/syscall_ptrace_test.go
@@ -28,8 +28,10 @@
 		},
 	}
 	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()
 }