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>
},
}
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()
}