|
From: Jeremy F. <ja...@lc...> - 2005-06-14 03:44:33
|
Tom Hughes wrote: >The exit status returned by valgrind is the exit status of the program >being run by valgrind - if valgrind were to replace that with it's own >exit status then you wouldn't know what the original exit status of the >program was. Right -- but I wouldn't care, either, because if valgrind reported an error, then the original exit status of the program is irrelevant -- the test mechanism has detected an error, no matter what exit value the original program returned. It would be important that valgrind not replace the original error code in the case where no valgrind errors were detected, of course. > I think most people doing this just grep the valgrind output for non-zero > error counts. I suppose that can be done, if necessary. Jeremy |
|
From: Tom H. <to...@co...> - 2005-06-14 05:55:01
|
In message <200...@lc...>
Jeremy Friesner <ja...@lc...> wrote:
> Tom Hughes wrote:
>
> >The exit status returned by valgrind is the exit status of the program
> >being run by valgrind - if valgrind were to replace that with it's own
> >exit status then you wouldn't know what the original exit status of the
> >program was.
>
> Right -- but I wouldn't care, either, because if valgrind reported an error,
> then the original exit status of the program is irrelevant -- the test
> mechanism has detected an error, no matter what exit value the original
> program returned.
>
> It would be important that valgrind not replace the original error code in
> the case where no valgrind errors were detected, of course.
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?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|