Skip to content
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

proposal: testing: add support for rr (rr-project.org) #62275

Closed
firelizzard18 opened this issue Aug 24, 2023 · 2 comments
Closed

proposal: testing: add support for rr (rr-project.org) #62275

firelizzard18 opened this issue Aug 24, 2023 · 2 comments
Labels
FrozenDueToAge Proposal WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@firelizzard18
Copy link
Contributor

With rr, I can run a process while generating a trace of its execution, and then replay that trace later and step forwards and backwards through it. Beyond being able to step backwards through a debug session, this also means I could run tests in CI using rr, and then download those traces and step through them on my local machine. This would be extremely valuable to me for debugging transient and hard to reproduce failures that sometimes only occur in CI.

I propose adding support to go test for running tests with rr, for example a boolean -rr flag that would wrap the test binary execution with rr record "$@", and an -rrflags flag to pass additional flags to rr. I believe go test is effectively executing exec.Command(testBinary, args...).Run() at some point so this could be implemented simply by modifying that to exec.Command("rr", "record", rrFlags..., testBinary, args...).Run() (this is pseudocode, for brevity).

@gopherbot gopherbot added this to the Proposal milestone Aug 24, 2023
@firelizzard18 firelizzard18 changed the title proposal: testing: add support for RR proposal: testing: add support for rr (rr-project.org) Aug 24, 2023
@seankhliao
Copy link
Member

Why is the -exec flag not sufficient?

@ianlancetaylor ianlancetaylor added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 24, 2023
@firelizzard18
Copy link
Contributor Author

I didn't know about that flag, that does serve my purposes.

@golang golang locked and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Proposal WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants