The skip was erroneously applied to errors from the call to StdoutPipe
instead of Start, and even then was a bit too broad.
Change-Id: I417c9a74692383230fc6d99ebb4149fdc532533e
Reviewed-on: https://go-review.googlesource.com/c/go/+/391800
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
"bufio"
"debug/elf"
"debug/macho"
+ "errors"
"fmt"
"internal/testenv"
"io"
var err error
disasm, err = cmd.StdoutPipe()
if err != nil {
- t.Skipf("can't run test due to missing objdump: %s", err)
+ t.Fatal(err)
}
if err := cmd.Start(); err != nil {
+ if errors.Is(err, exec.ErrNotFound) {
+ t.Skipf("can't run test due to missing objdump: %s", err)
+ }
t.Fatal(err)
}
re = regexp.MustCompile(`^\s*([0-9a-f]+):\s*((?:[0-9a-f][0-9a-f] )+)\s*([a-z0-9]+)`)