Tom Hughes wrote:
> That's not possible as you would have no way of knowing where the
> exit status came from - if valgrind exits with 1 when errors are
> found and preserves the code in other cases how you would you know
> whether an exit code of 1 came from your program or valgrind?
You are right, there would be no way to know whether the 1 came
from the program or from valgrind.
But it doesn't matter where the 1 came from, because in either case,
the action required from the calling script is the same: report that the test
failed and move on. It's then up to the developer to go back and determine
why the test failed, and fix the bug.
(of course, while it's not an issue for me, it might be an issue for other
people... a work-around would be to allow the caller to specify valgrind's
error code as part of the flag to valgrind, e.g.