-
Notifications
You must be signed in to change notification settings - Fork 741
bogo: implement -wait-for-debugger in shim #2347
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2347 +/- ##
==========================================
- Coverage 94.89% 94.86% -0.03%
==========================================
Files 103 103
Lines 24274 24287 +13
==========================================
+ Hits 23034 23040 +6
- Misses 1240 1247 +7 ☔ View full report in Codecov by Sentry. |
Benchmark resultsInstruction countsSignificant differencesThere are no significant instruction count differences Other differencesClick to expand
Wall-timeSignificant differencesThere are no significant wall-time differences Other differencesClick to expand
Additional informationCheckout details:
|
edd6a68
to
caaa692
Compare
Also updates the `runme` script to conditionally exclude the `-test.timeout` flag given to the BoGo runner when `-wait-for-debugger` is in use. The implementation in the shim depends on UNIX SIGSTOP signalling, and so is conditional to UNIX-like systems. Providing the flag on another platform will panic with an error message.
We can use the standard `Arc` here without worry.
caaa692
to
ff191bb
Compare
Also updates the
runme
script to conditionally exclude the-test.timeout
flag given to the BoGo runner when-wait-for-debugger
is in use.The implementation in the shim depends on UNIX SIGSTOP signalling, and so is conditional to UNIX-like systems. Providing the flag on another platform will panic with an error message.
Having this support makes it possible to debug the Rustls-side of the BoGo testing process by having the BoringSSL-side Go test runner start the shim process in a suspended state. In this mode the test runner turns off some timeouts, reduces parallelism to 1 task at a time, and prints the PID of the shim process to attach to with a Rust-friendly debugger. By using
delve
or another Go debugger it's also possible to debug the runner-side in conjugation with the shim. This should be a nice alternative to the tedious print-style-debugging I've used in the past :-)