-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testscript: should GOTRACEBACK be explicitly set in the environment? #245
Comments
Agreed. We should not be triggering or investigating runtime bugs. |
The default (single) is good for panics, but pretty useless for SIGQUIT since the signal handler is not the reason the program timed out.
I think I picked system by mistake though, it should be all.
|
Using |
I'll very much defer to others' greater experience/understanding here :) Happy to do the change if someone can provide me with some good commentary on why we are using |
My understanding is that, when a testscript panics, with I'm not sure what Filippo means with SIGQUIT; my understanding is that a SIGQUIT makes the Go runtime always print all goroutine stacks before exiting, presumably regardless of the |
In #171, the following change was made to explicitly set
GOTRACEBACK
in thetestscript
environment:go-internal/testscript/testscript.go
Line 394 in 9957a52
This mirrors a similar setting in upstream:
https://github.com/golang/go/blob/4a7f3ac8eb4381ea62caa1741eeeec28363245b4/src/cmd/go/script_test.go#L227C4-L227C11
It's not clear to me whether we need/want such a setting because the explicit setting of
GOTRACEBACK
causes trace output to differ from the Go default, the latter most likely being what the script author would expect.The setting of the value in upstream is explained in the commit message for golang/go@d83baa1:
I don't think that logic applies by default for users of
testscript
outside of the Go project.Hence my suggestion would be that we remove this explicit setting, to restore the default behaviour of
cmd/go
.cc @mvdan @FiloSottile
The text was updated successfully, but these errors were encountered: