njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 3 | dir=`dirname $0` |
| 4 | |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 5 | $dir/../../tests/filter_stderr_basic | |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 6 | |
| 7 | # Anonymise addresses |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 8 | $dir/../../tests/filter_addresses | |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 9 | |
njn | b9c427c | 2004-12-01 14:14:42 +0000 | [diff] [blame] | 10 | # Remove "Memcheck, ..." line and the following copyright line. |
| 11 | sed "/^Memcheck, a memory error detector/ , /./ d" | |
| 12 | |
njn | acdcf54 | 2009-03-16 00:59:17 +0000 | [diff] [blame] | 13 | # Replace exit_group() with exit(), because you can get either on Linux |
| 14 | # depending on the system. |
| 15 | perl -p -e "s/param exit_group\(status\)/param exit(status)/" | |
| 16 | |
njn | 8df80b2 | 2009-03-02 05:11:06 +0000 | [diff] [blame] | 17 | # Leak check filtering. |
| 18 | sed "s/checked [0-9,]* bytes./checked ... bytes./" | |
| 19 | |
| 20 | # More leak check filtering. For systems that do extra libc allocations |
| 21 | # (eg. Darwin) there may be extra (reachable, and thus not shown) loss |
| 22 | # records. So we filter out the loss record numbers. |
florian | 3dfe979 | 2011-10-03 23:39:54 +0000 | [diff] [blame] | 23 | perl -p -e "s/in loss record \d+ of \d+/in loss record ... of .../" | |
njn | 870f170 | 2009-02-16 05:11:49 +0000 | [diff] [blame] | 24 | |
tom | fc75e5e | 2013-02-28 12:50:55 +0000 | [diff] [blame] | 25 | # Filter out glibc debuginfo if installed. |
| 26 | perl -p -e "s/\(syscall-template.S:[0-9]*\)/(in \/...libc...)/" | |
Elliott Hughes | ed39800 | 2017-06-21 14:41:24 -0700 | [diff] [blame^] | 27 | perl -p -e "s/sendmsg \(sendmsg.c:[0-9]*\)/sendmsg (in \/...libc...)/" | |
mjw | 9746147 | 2014-08-26 19:41:51 +0000 | [diff] [blame] | 28 | perl -p -e "s/\(socket.S:[0-9]*\)/(in \/...libc...)/" | |
tom | fc75e5e | 2013-02-28 12:50:55 +0000 | [diff] [blame] | 29 | |
mjw | b444fbc | 2014-08-26 22:15:58 +0000 | [diff] [blame] | 30 | # Newer architectures (aarch64) implement poll by calling ppoll directly. |
| 31 | perl -p -e "s/Syscall param ppoll\(ufds/Syscall param poll\(ufds/" | |
| 32 | |
florian | 3dfe979 | 2011-10-03 23:39:54 +0000 | [diff] [blame] | 33 | $dir/../../memcheck/tests/filter_memcheck "$@" |
| 34 | |
| 35 | exit 0 |