We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation .
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
Would it be possible to use rr-debugger as a library? I have a use case where I want to record the execution of all my tests and only keep the record if the test failed (and do that programatically).
I'm wondering if it is possible to call RecordCommand::run() before executing my test. Maybe this doesn't make sense but I can see a real advantage of being able to at least record by using some APIs from a library.
RecordCommand::run()
Thanks for your time.
The text was updated successfully, but these errors were encountered:
I have a use case where I want to record the execution of all my tests and only keep the record if the test failed (and do that programatically).
rr returns the exit code of the application you recorded. So you can write a program (e.g. a shell script) that runs rr, checks the exit code, and delete the recording if the test failed.
Sorry, something went wrong.
Thanks for your quick response!
Right, I was wondering about a more fine grained execution, so let's say I have a tester that runs 100 tests. I'd like to record each test individually and keep the record only if the test failed (and not the recording of the execution of the entire tester).
Also, and specially, in a fuzz testing scenario, where the same code is tested multiple times based on the generated inputs by the fuzz engine (a process that can't be stopped and relaunched, since metrics like coverage would be loss), I'd like to record the execution of the code for each generated input, and again discard the recording based on the result.
Is there any mechanism that could fit for this scenario?
Again, thanks for your time, any help is much appreciated.
rr can't split up a recording of a single process execution to just isolate one sub-test that failed.
For fuzzing, usually people take the failing fuzzing input, run some minimization algorithm on it, and then re-record that with rr for debugging.
Thanks again for your response and sorry for the delay in mine.
I apologize if I haven't expressed myself clearly, it is not about splitting up a recording but making recordings in a more fine tune way. The idea would be to be able to start and stop recordings by calling some public API (let's say, recordStart() and recordStop()) from the source code and thus using rr as a library.
Nevertheless, I understand from your messages that this scenario/functionality is not currently provided by rr. Based on your knowledge about the tool, do you think this is something achievable? I'm thinking about implementing this functionality myself but I'm not even sure if it is possible at all. Any comment or hint about it would be greatly appreciated.
Again, thanks for your time, I appreciate a lot your help.
@rocallahan Did you have the chance to see my latest comment? Any thoughts about it?
Greatly appreciated :)
The idea would be to be able to start and stop recordings by calling some public API (let's say, recordStart() and recordStop()) from the source code and thus using rr as a library.
It probably could be done but it would be pretty hard. The especially hard part is taking a snapshot of the current state at the start of the recording and getting everything set up. Right now we rely on setting everything (e.g. seccomp filters) up in an initial process and then all other tracees inheriting the right settings, and also on setting up various things whenever there's an execve.
No branches or pull requests