testscript: import timeout behavior from stdlib#171
testscript: import timeout behavior from stdlib#171mvdan merged 1 commit intorogpeppe:masterfrom FiloSottile:filippo/timeout
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. |
mvdan
left a comment
There was a problem hiding this comment.
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! |
mvdan
left a comment
There was a problem hiding this comment.
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.timeoutflag (or theParams.Deadlinefield) to send firstSIGQUIT(to get a stack trace) and thenSIGKILLto 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.