aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-03-27 10:09:26 -0700
committerIan Lance Taylor <iant@golang.org>2020-03-27 20:19:34 +0000
commitf5558bb2f580ed40374a98e8db6fd58ae79f6e1d (patch)
tree30d6f8631a718e39e97efea9331f38f1f663dfd2 /src/os/exec/exec_test.go
parentaf7eafd1505f9e150aa9fc21cd3f19da42a30333 (diff)
downloadgo-f5558bb2f580ed40374a98e8db6fd58ae79f6e1d.tar.gz
go-f5558bb2f580ed40374a98e8db6fd58ae79f6e1d.zip
os/exec: add temporary debugging code for #25628
On linux-386 builders run the TestExtraFiles subprocess under strace, in hopes of finding out where the unexpected descriptor is coming from. For #25628 Change-Id: I9a62d6a5192a076525a616ccc71de74bbe7ebd58 Reviewed-on: https://go-review.googlesource.com/c/go/+/225799 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/os/exec/exec_test.go')
-rw-r--r--src/os/exec/exec_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index 91dd0a41ac..9d6069093e 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -79,6 +79,13 @@ func helperCommandContext(t *testing.T, ctx context.Context, s ...string) (cmd *
} else {
cmd = exec.Command(os.Args[0], cs...)
}
+
+ // Temporary code to try to resolve #25628.
+ // TODO(iant): Remove this when we no longer need it.
+ if runtime.GOARCH == "386" && runtime.GOOS == "linux" && testenv.Builder() != "" && len(s) == 1 && s[0] == "read3" && ctx == nil {
+ cmd = exec.Command("/usr/bin/strace", append([]string{"-f", os.Args[0]}, cs...)...)
+ }
+
cmd.Env = append(os.Environ(), "GO_WANT_HELPER_PROCESS=1")
return cmd
}