blob: 7b3003d533e7e3ca9f69224f8e0a3dc08ddccb11 [file] [log] [blame]
sewardjb4112022007-11-09 22:49:28 +00001#! /bin/sh
2
3dir=`dirname $0`
4
5$dir/../../tests/filter_stderr_basic |
6
7# Anonymise addresses
8$dir/../../tests/filter_addresses |
9
sewardjc7f1b002008-12-18 08:27:32 +000010# get rid of the numbers in bits of text "Thread #n", "thread #n",
philippe5b2bdd92014-06-06 23:45:46 +000011# "Thread n" and "thread n", "tid n"
sewardjc7f1b002008-12-18 08:27:32 +000012# as these make some tests more scheduling sensitive -- those where
13# there are multiple threads which play interchangeable roles.
14sed \
philippe5b2bdd92014-06-06 23:45:46 +000015 -e "s/tid [0-9][0-9]*/tid #x/g" \
sewardjc7f1b002008-12-18 08:27:32 +000016 -e "s/hread #[0-9][0-9]*/hread #x/g" \
njn553c42f2009-03-13 01:41:03 +000017 -e "s/hread [0-9][0-9]*/hread x/g" |
18
19# Likewise for frame numbers, which depend on compilation.
20sed -e "s/frame #[0-9][0-9]*/frame #x/g" | \
21
florian31014da2011-09-26 00:29:44 +000022# Merge sem_wait and sem_wait@*, as either could be used. Likewise for
23# sem_post.
24sed \
25 -e "s/sem_wait@\*/sem_wait/" \
26 -e "s/sem_post@\*/sem_post/" |
njn553c42f2009-03-13 01:41:03 +000027
florian31014da2011-09-26 00:29:44 +000028# Remove "Helgrind, ..." line and the following copyright line;
29# also the standard postamble (does such a word exist?)
philippe04910c32014-05-18 17:09:44 +000030# And also remove pthread_create_WRK lines, as ppc64 stacktraces
31# do not contain them (at least on gcc110/fedora18).
florian31014da2011-09-26 00:29:44 +000032sed \
33 -e "/^Helgrind, a thread error detector/ , /./ d" \
34 -e "/^For counts of detected and suppressed errors, rerun with: -v$/d" \
35 -e "/^Use --history-level=approx or =none to gain increased speed, at$/d" \
philippe04910c32014-05-18 17:09:44 +000036 -e "/^the cost of reduced accuracy of conflicting-access information$/d" \
37 -e "/pthread_create_WRK (hg_intercepts.c:/d" |
njn553c42f2009-03-13 01:41:03 +000038
mjwd18b9022014-08-28 14:59:08 +000039# Some arches return ENOSYS instead of EINVAL for undefined futex operations.
40sed -e "s/with error code 38 (ENOSYS: Function not implemented)/with error code 22 (EINVAL: Invalid argument)/" |
41
florian31014da2011-09-26 00:29:44 +000042$dir/../../helgrind/tests/filter_helgrind "$@"
njn553c42f2009-03-13 01:41:03 +000043
florian31014da2011-09-26 00:29:44 +000044exit 0