From: Nicholas Nethercote Date: Wed, 26 Feb 2003 10:16:02 +0000 (+0000) Subject: Added a stderr filter for new_override, that removes the exact numbers for X-Git-Tag: svn/VALGRIND_1_9_4~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18199aae8a3394c0efed142fcd02762ffbe56694;p=thirdparty%2Fvalgrind.git Added a stderr filter for new_override, that removes the exact numbers for malloc, because different glibc versions seem to allocate different amounts of memory. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1446 --- diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index ccad89a24e..b29427d61a 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -9,7 +9,7 @@ ## strict EIP updating ##--------------------------------------------------------------------------- -noinst_SCRIPTS = filter_leak_check_size filter_stderr +noinst_SCRIPTS = filter_allocs filter_leak_check_size filter_stderr EXTRA_DIST = \ $(noinst_SCRIPTS) \ diff --git a/memcheck/tests/filter_allocs b/memcheck/tests/filter_allocs new file mode 100755 index 0000000000..84bdae57eb --- /dev/null +++ b/memcheck/tests/filter_allocs @@ -0,0 +1,6 @@ +#! /bin/sh + +./filter_stderr | \ +sed "s/malloc\/free: in use at exit: [0-9]\+ bytes in [0-9]\+ blocks./malloc\/free: in use at exit: ... bytes in ... blocks./" | \ +sed "s/malloc.free: [0-9]\+ allocs, [0-9]\+ frees, [0-9]\+ bytes allocated./malloc\/free: ... allocs, ... frees, ... bytes allocated./" + diff --git a/memcheck/tests/new_override.stderr.exp b/memcheck/tests/new_override.stderr.exp index 2196abe4e9..e512db706c 100644 --- a/memcheck/tests/new_override.stderr.exp +++ b/memcheck/tests/new_override.stderr.exp @@ -5,7 +5,7 @@ Conditional jump or move depends on uninitialised value(s) by 0x........: (within /.../tests/new_override) ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0) -malloc/free: in use at exit: 32 bytes in 1 blocks. -malloc/free: 1 allocs, 0 frees, 32 bytes allocated. +malloc/free: in use at exit: ... bytes in ... blocks. +malloc/free: ... allocs, ... frees, ... bytes allocated. For a detailed leak analysis, rerun with: --leak-check=yes For counts of detected errors, rerun with: -v diff --git a/memcheck/tests/new_override.vgtest b/memcheck/tests/new_override.vgtest index 4f11a5b1ce..50e6240342 100644 --- a/memcheck/tests/new_override.vgtest +++ b/memcheck/tests/new_override.vgtest @@ -1 +1,2 @@ prog: new_override +stderr_filter: filter_allocs