[ovs-dev] [PATCHv4] valgrind: Parse the summary of valgrind results.

Ben Pfaff blp at ovn.org
Tue May 17 23:59:24 UTC 2016


On Fri, Apr 29, 2016 at 03:32:17PM -0700, William Tu wrote:
> Before, the 'make check-valgrind' merely outputs results to
> tests/testsuite.dir/*/valgrind* and depends on users to verify any errors
> in those files.  This patch greps results and shows a summary.
> 
> The patch ignores the exit status of testsuite by adding '-' before $(SHELL),
> so that even if test case fails, the make continues executing
> 'valgrind-parse.sh' and reports total errors.  The exit status is not
> important here becuase we assume 'make check' catches the testsuite error, so
> here 'make check-valgrind' focuses on valgrind's report.
> 
> Signed-off-by: William Tu <u9012063 at gmail.com>
> 
> ---
> v3: https://patchwork.ozlabs.org/patch/604272/
> v3->v4
> - remove --erroddrs-for-leak-kinds=definite, definite and possible
>   memory leak will be consider errors.
> - use /bin/sh insteaf of /bin/bash
> - code refactoring, fixing some unnecessary portability assumptions.
> 
>   An example run:
>   ----------------------------------------------------------------------
>   Valgrind output can be found in tests/testsuite.dir/*/valgrind.*\n

I think that the \n above should be omitted.

>   ----------------------------------------------------------------------
>   MemLeak: Definitely lost: ok
>   MemLeak: Possibly lost: FAILED
>   Invalid write/read: ok
>   Invalid/Mismatched free: ok
>   Conditional jump or move depends on uninitialised value: ok
>   Syscall param write(buf) points to uninitialised: ok
>   Source and destination overlap: ok
>   -----------------
>   Total errors: 468 
>   -----------------

I get the following:

    -----------------
    Total errors: 
    -----------------
    /home/blp/nicira/ovs/_build/../tests/valgrind-parse.sh: line 59: [: : integer expression expected

I think it's because I have -q in my ~/.valgrindrc; I guess that you
should handle that case better.

Thanks,

Ben.



More information about the dev mailing list