Bug 395139

Summary: Terminate process and fail at errors.
Product: [Developer tools] valgrind Reporter: Christian Brolin <cbrolin>
Component: memcheckAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Christian Brolin 2018-06-08 10:02:47 UTC
I'm running memcheck embedded in a quick check framework. This framework starts a program and test its API randomly. In case of an error, the program is restarted and the random sequence that lead to the error is iteratively reduced as long as it still leads to the error.

As an option it is also possible to run the program under valgrind/memcheck control. But the test framework will not notice any errors that memcheck has detected until the program is terminated. In this case I want to the program to stop with an exit code. I wish I could write something like:

  --error-limit=1
  --error-exitcode=42

Both these flags currently exist but the --error-limit accepts only "no" and "yes", where "yes" is a too high limit for my case.