|
From: Paul L D. <pld...@pl...> - 2003-09-08 00:45:37
|
Is there a way to get valgrind to exit a non-zero return code if it finds errors in the grind process? So far I've noticed that it essentially always returns '0' if valgrind itself didn't fail. I've looked at the valgrind help output - and I've tried searching the online email archives (which seem to be broken a bit, I keep getting 'Forum not found' when I try to move to the next page). I want to do this so that I can run valgrind in a shell script which I currently use to validate my program (using ~5000 data set tests ) - and have the shell script halt if valgrind finds a problem while running one of the tests. Regards. -- Paul L Daniels http://www.pldaniels.com Linux/Unix systems Internet Development ICQ#103642862,AOL:pldsoftware,IRC:inflex irc.freenode.net A.B.N. 19 500 721 806 |
|
From: Nicholas N. <nj...@ca...> - 2003-09-08 07:23:14
|
On Mon, 8 Sep 2003, Paul L Daniels wrote: > Is there a way to get valgrind to exit a non-zero return code if it > finds errors in the grind process? > > So far I've noticed that it essentially always returns '0' if valgrind > itself didn't fail. Well, it does (or should) return the same value that the non-valground process does. > I want to do this so that I can run valgrind in a shell script which I > currently use to validate my program (using ~5000 > data set tests ) - and have the shell script halt if valgrind finds a > problem while running one of the tests. If the valground process returned non-zero, how could you tell if it was because Valgrind found errors, or because the process returned non-zero? An alternative solution is to run valgrind with -q, send the output to a file (using a command line like "valgrind --logfile=tmp myprog") and then check the file for zero size. N |
|
From: Paul L D. <pld...@pl...> - 2003-09-09 02:11:49
|
> Well, it does (or should) return the same value that the non-valground > process does. Okay, point understood. Just had to check first to be sure ;-) > file (using a command line like "valgrind --logfile=tmp myprog") and then > check the file for zero size. Thanks - that was one of my 'second choices' - now working fine. Kind Regards. -- Paul L Daniels http://www.pldaniels.com Linux/Unix systems Internet Development ICQ#103642862,AOL:pldsoftware,IRC:inflex irc.freenode.net A.B.N. 19 500 721 806 |