From: Julian Seward Date: Thu, 18 Dec 2008 08:27:32 +0000 (+0000) Subject: Move the functionality from filter_threadnums into filter_stderr, so that X-Git-Tag: svn/VALGRIND_3_4_0~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b78563919c9fd6f0a193ab93893f192aa63afdc4;p=thirdparty%2Fvalgrind.git Move the functionality from filter_threadnums into filter_stderr, so that it applies to all tests. Then remove all references to filter_threadnums. Also: * match and transform not only "Thread #n" and "thread #n" but also "Thread n" and "thread n", where n is [0-9][0-9]*. * use -e ... for the sed commands where possible, to reduce the number of processes that have to be started git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8839 --- diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index 35e15bb9fc..c3c3597f18 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -2,7 +2,7 @@ # For AM_FLAG_M3264_PRI include $(top_srcdir)/Makefile.flags.am -noinst_SCRIPTS = filter_stderr filter_threadnums +noinst_SCRIPTS = filter_stderr EXTRA_DIST = $(noinst_SCRIPTS) \ bar_bad.vgtest bar_bad.stdout.exp \ diff --git a/helgrind/tests/filter_stderr b/helgrind/tests/filter_stderr index f2b45d7d9a..7c472b68d6 100755 --- a/helgrind/tests/filter_stderr +++ b/helgrind/tests/filter_stderr @@ -14,8 +14,9 @@ sed "/^Helgrind, a thread error detector/ , /./ d" | sed "s/hg_intercepts.c:[0-9]*/hg_intercepts.c:.../g" | # Change (eg) "/lib64/libpthread-2.5.so" into "/lib/libpthread..." -sed "s/lib64/lib/g" | -sed "s/libpthread.*so/libpthread\.\.\./g" | +sed \ + -e "s/lib64/lib/g" \ + -e "s/libpthread.*so/libpthread\.\.\./g" | # Change (eg) "pthread_create@@GLIBC_2.2.5" into "pthread_create@GLIBC" # and (eg) "pthread_create@GLIBC_2.1" into "pthread_create@GLIBC" @@ -23,8 +24,17 @@ sed "s/@@*GLIBC_2[0123456789\.]*/@GLIBC_/g" | # Tidy up in cases where glibc (+ libdl + libpthread + ld) have # been built with debugging information, hence source locs are present -sed "s/(createthread.c:[0-9]*)/(in \/lib\/libpthread...)/g" | -sed "s/(clone.S:[0-9]*)/(in \/...libc...)/g" | -sed "s/start_thread (pthread_create.c:[0-9]*)$/start_thread (in \/lib\/libpthread...)/g" | +sed \ + -e "s/(createthread.c:[0-9]*)/(in \/lib\/libpthread...)/g" \ + -e "s/(clone.S:[0-9]*)/(in \/...libc...)/g" \ + -e "s/start_thread (pthread_create.c:[0-9]*)$/start_thread (in \/lib\/libpthread...)/g" | + +# get rid of the numbers in bits of text "Thread #n", "thread #n", +# "Thread n" and "thread n", +# as these make some tests more scheduling sensitive -- those where +# there are multiple threads which play interchangeable roles. +sed \ + -e "s/hread #[0-9][0-9]*/hread #x/g" \ + -e "s/hread [0-9][0-9]*/hread x/g" $dir/../../tests/filter_test_paths diff --git a/helgrind/tests/filter_threadnums b/helgrind/tests/filter_threadnums deleted file mode 100755 index 4312d20fa9..0000000000 --- a/helgrind/tests/filter_threadnums +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -./filter_stderr | - -# get rid of the numbers in bits of text "Thread #n" and "thread #n" -# as these make some tests more scheduling sensitive -- those where -# there are multiple threads which play interchangeable roles. - -sed "s/hread #[0-9]*/hread #x/" diff --git a/helgrind/tests/pth_barrier1.vgtest b/helgrind/tests/pth_barrier1.vgtest index 2896fa6754..be0ef7bea3 100644 --- a/helgrind/tests/pth_barrier1.vgtest +++ b/helgrind/tests/pth_barrier1.vgtest @@ -1,4 +1,3 @@ prog: pth_barrier args: 2 1 1 vgopts: -q -stderr_filter: ./filter_threadnums diff --git a/helgrind/tests/pth_barrier2.vgtest b/helgrind/tests/pth_barrier2.vgtest index ebe0fda433..adbc3a8057 100644 --- a/helgrind/tests/pth_barrier2.vgtest +++ b/helgrind/tests/pth_barrier2.vgtest @@ -1,4 +1,3 @@ prog: pth_barrier args: 2 32 1 vgopts: -q --cmp-race-err-addrs=yes -stderr_filter: ./filter_threadnums diff --git a/helgrind/tests/pth_barrier3.vgtest b/helgrind/tests/pth_barrier3.vgtest index bdb9e6d496..5798c39057 100644 --- a/helgrind/tests/pth_barrier3.vgtest +++ b/helgrind/tests/pth_barrier3.vgtest @@ -1,4 +1,3 @@ prog: pth_barrier args: 32 1 1 vgopts: -q -stderr_filter: ./filter_threadnums diff --git a/helgrind/tests/tc21_pthonce.vgtest b/helgrind/tests/tc21_pthonce.vgtest index 37688a1252..d9b9a81be1 100644 --- a/helgrind/tests/tc21_pthonce.vgtest +++ b/helgrind/tests/tc21_pthonce.vgtest @@ -1,2 +1 @@ prog: tc21_pthonce -stderr_filter: ./filter_threadnums