1
0
mirror of https://github.com/golang/go synced 2024-09-28 20:14:28 -06:00

runtime: use testenv.Command in TestG0StackOverflow

For debugging timeouts.

Change-Id: I08dc86ec0264196e5fd54066655e94a9d062ed80
Reviewed-on: https://go-review.googlesource.com/c/go/+/538697
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
Cherry Mui 2023-10-31 16:26:52 -04:00
parent b11defeaed
commit d2f3a68bf0

View File

@ -797,7 +797,7 @@ func TestG0StackOverflow(t *testing.T) {
}
if os.Getenv("TEST_G0_STACK_OVERFLOW") != "1" {
cmd := testenv.CleanCmdEnv(exec.Command(os.Args[0], "-test.run=^TestG0StackOverflow$", "-test.v"))
cmd := testenv.CleanCmdEnv(testenv.Command(t, os.Args[0], "-test.run=^TestG0StackOverflow$", "-test.v"))
cmd.Env = append(cmd.Env, "TEST_G0_STACK_OVERFLOW=1")
out, err := cmd.CombinedOutput()
// Don't check err since it's expected to crash.