sewardj | b411202 | 2007-11-09 22:49:28 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
| 3 | dir=`dirname $0` |
| 4 | |
| 5 | $dir/../../tests/filter_stderr_basic | |
| 6 | |
| 7 | # Anonymise addresses |
| 8 | $dir/../../tests/filter_addresses | |
| 9 | |
sewardj | c7f1b00 | 2008-12-18 08:27:32 +0000 | [diff] [blame] | 10 | # get rid of the numbers in bits of text "Thread #n", "thread #n", |
philippe | 5b2bdd9 | 2014-06-06 23:45:46 +0000 | [diff] [blame] | 11 | # "Thread n" and "thread n", "tid n" |
sewardj | c7f1b00 | 2008-12-18 08:27:32 +0000 | [diff] [blame] | 12 | # as these make some tests more scheduling sensitive -- those where |
| 13 | # there are multiple threads which play interchangeable roles. |
| 14 | sed \ |
philippe | 5b2bdd9 | 2014-06-06 23:45:46 +0000 | [diff] [blame] | 15 | -e "s/tid [0-9][0-9]*/tid #x/g" \ |
sewardj | c7f1b00 | 2008-12-18 08:27:32 +0000 | [diff] [blame] | 16 | -e "s/hread #[0-9][0-9]*/hread #x/g" \ |
njn | 553c42f | 2009-03-13 01:41:03 +0000 | [diff] [blame] | 17 | -e "s/hread [0-9][0-9]*/hread x/g" | |
| 18 | |
| 19 | # Likewise for frame numbers, which depend on compilation. |
| 20 | sed -e "s/frame #[0-9][0-9]*/frame #x/g" | \ |
| 21 | |
florian | 31014da | 2011-09-26 00:29:44 +0000 | [diff] [blame] | 22 | # Merge sem_wait and sem_wait@*, as either could be used. Likewise for |
| 23 | # sem_post. |
| 24 | sed \ |
| 25 | -e "s/sem_wait@\*/sem_wait/" \ |
| 26 | -e "s/sem_post@\*/sem_post/" | |
njn | 553c42f | 2009-03-13 01:41:03 +0000 | [diff] [blame] | 27 | |
florian | 31014da | 2011-09-26 00:29:44 +0000 | [diff] [blame] | 28 | # Remove "Helgrind, ..." line and the following copyright line; |
| 29 | # also the standard postamble (does such a word exist?) |
philippe | 04910c3 | 2014-05-18 17:09:44 +0000 | [diff] [blame] | 30 | # And also remove pthread_create_WRK lines, as ppc64 stacktraces |
| 31 | # do not contain them (at least on gcc110/fedora18). |
florian | 31014da | 2011-09-26 00:29:44 +0000 | [diff] [blame] | 32 | sed \ |
| 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" \ |
philippe | 04910c3 | 2014-05-18 17:09:44 +0000 | [diff] [blame] | 36 | -e "/^the cost of reduced accuracy of conflicting-access information$/d" \ |
| 37 | -e "/pthread_create_WRK (hg_intercepts.c:/d" | |
njn | 553c42f | 2009-03-13 01:41:03 +0000 | [diff] [blame] | 38 | |
mjw | d18b902 | 2014-08-28 14:59:08 +0000 | [diff] [blame] | 39 | # Some arches return ENOSYS instead of EINVAL for undefined futex operations. |
| 40 | sed -e "s/with error code 38 (ENOSYS: Function not implemented)/with error code 22 (EINVAL: Invalid argument)/" | |
| 41 | |
florian | 31014da | 2011-09-26 00:29:44 +0000 | [diff] [blame] | 42 | $dir/../../helgrind/tests/filter_helgrind "$@" |
njn | 553c42f | 2009-03-13 01:41:03 +0000 | [diff] [blame] | 43 | |
florian | 31014da | 2011-09-26 00:29:44 +0000 | [diff] [blame] | 44 | exit 0 |