Skip to content

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

@firelizzard18

Description

@firelizzard18

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeProposalWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions