|
From: Bob R. <bo...@br...> - 2004-11-02 13:56:20
|
Hi, I would like to script valgrind so that it runs nightly. I am interested to know how I know if valgrind found at least one bug in the executable it ran under. Is it supposed to return a non-zero value if at least one problem was found? Thanks, Bob Rossi |
|
From: Tom H. <th...@cy...> - 2004-11-02 14:45:54
|
In message <20041102135611.GB4165@white>
Bob Rossi <bo...@br...> wrote:
> I would like to script valgrind so that it runs nightly. I am interested
> to know how I know if valgrind found at least one bug in the executable
> it ran under. Is it supposed to return a non-zero value if at least one
> problem was found?
No. The exit status of valgrind is the exit status of the program that
you were running under valgrind so that it is transparent.
You need to grep the log file to do what you want.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Tom S. <to...@pl...> - 2004-11-02 16:53:50
|
On Tue, 2004-11-02 at 06:56, Bob Rossi wrote: > Hi, > > I would like to script valgrind so that it runs nightly. I am interested > to know how I know if valgrind found at least one bug in the executable > it ran under. Is it supposed to return a non-zero value if at least one > problem was found? I just checked our overnight build script which does this. We just use "-quiet". Our smoke test program is designed to output nothing if it finds no problems. That combined with the -quiet to valgrind means no output at all if there are no problems. -- Tom Schutter (mailto:to...@pl...) Platte River Associates, Inc. (http://www.platte.com) |
|
From: Nicholas N. <nj...@ca...> - 2004-11-02 19:10:54
|
On Tue, 2 Nov 2004, Tom Schutter wrote: >> I would like to script valgrind so that it runs nightly. I am interested >> to know how I know if valgrind found at least one bug in the executable >> it ran under. Is it supposed to return a non-zero value if at least one >> problem was found? > > I just checked our overnight build script which does this. We just use > "-quiet". Our smoke test program is designed to output nothing if it > finds no problems. That combined with the -quiet to valgrind means no > output at all if there are no problems. Or you can use the VALGRIND_COUNT_ERRORS client request in your test harness, as described in the manual. N |
|
From: Bob R. <bo...@br...> - 2004-11-29 20:17:30
|
On Tue, Nov 02, 2004 at 07:09:37PM +0000, Nicholas Nethercote wrote: > On Tue, 2 Nov 2004, Tom Schutter wrote: > > >>I would like to script valgrind so that it runs nightly. I am interested > >>to know how I know if valgrind found at least one bug in the executable > >>it ran under. Is it supposed to return a non-zero value if at least one > >>problem was found? > > > >I just checked our overnight build script which does this. We just use > >"-quiet". Our smoke test program is designed to output nothing if it > >finds no problems. That combined with the -quiet to valgrind means no > >output at all if there are no problems. > > Or you can use the VALGRIND_COUNT_ERRORS client request in your test > harness, as described in the manual. OK, I finally got around to doing this. There is one problem though, there doesn't seem to be a way to find out if there were any memory leaks. This option does not count memory leaks. Is there any way to add that as another macro? Thanks, Bob Rossi |
|
From: Olly B. <ol...@su...> - 2004-11-29 22:51:57
|
On 2004-11-29, Bob Rossi <bo...@br...> wrote:
> On Tue, Nov 02, 2004 at 07:09:37PM +0000, Nicholas Nethercote wrote:
>> Or you can use the VALGRIND_COUNT_ERRORS client request in your test
>> harness, as described in the manual.
>
> OK, I finally got around to doing this. There is one problem though,
> there doesn't seem to be a way to find out if there were any memory
> leaks. This option does not count memory leaks.
Try VALGRIND_COUNT_LEAKS (probably after VALGRIND_DO_LEAK_CHECK to
actually perform the leak checking).
There's one tiny flaw - it reports leaked bytes, so you can't detect if
a zero-sized allocation is leaked.
Cheers,
Olly
|