Re: Valgrind-users digest, Vol 1 #811 - 9 msgs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Valgrind-users digest, Vol 1 #811 - 9 msgs

Jeremy Friesner
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.

   valgrind --on_error_exit_with_code=12345 ./my_test_program

would cause valgrind to exit with error code 12345 if an error was
encountered.  The user could then choose an error code that was not one
generated by the test program)

Jeremy


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users