Currently this test panics if the error is not an ExitError. We aren't
expecting other errors, but we want to continue to the t.Fatal so the
error contents actually get logged.
For #74672.
Change-Id: I6a6a636cee5ddac500ed7ec549340b02944101ab
Reviewed-on: https://go-review.googlesource.com/c/go/+/689956
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
t.Logf("%s", out)
}
if err != nil {
- if err := err.(*exec.ExitError); err != nil && err.Sys().(syscall.WaitStatus).Signaled() {
+ if err, ok := err.(*exec.ExitError); ok && err.Sys().(syscall.WaitStatus).Signaled() {
if !bytes.Contains(out, []byte("+++ killed by")) {
// strace itself occasionally crashes.
// Here, it exited with a signal, but