-
Notifications
You must be signed in to change notification settings - Fork 70
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: import timeout behavior from stdlib #171
Conversation
Did you somehow write this PR on top of an older master? GitHub reports conflicts :) |
Ah yep, I did, I've been using this for a bit in my fork. I'll rebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes as a reminder that this needs a rebase.
Conflict resolved! :) |
There are conflicts again, my apologies. We recently merged a regression in the -continue flag, and I forgot that this was in flight already. If you can fix them again, which should hopefully not be too hard, I'll make sure to review quickly. |
This uses the -test.timeout flag (or the Params.Deadline field) to send first SIGQUIT (to get a stack trace) and then SIGKILL to a stuck command.
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! For some context, this started appearing upstream in https://go-review.googlesource.com/c/go/+/233526.
@FiloSottile - out of interest, why did this line get added as part of this change? It appears unrelated to the main purpose of the PR, but would like to check whether I'm missing something in that analysis. |
This uses the
-test.timeout
flag (or theParams.Deadline
field) to send firstSIGQUIT
(to get a stack trace) and thenSIGKILL
to a stuck command. It's mostly imported from the current stdlib code, with tweaks to work around the lack of Deadline and Cleanup method access.