Add DRD suppression patterns for races triggered by std::ostream
[valgrind.git] / helgrind / tests / filter_stderr
blobcfdd89496a25b0645e35f1e8de41d36ad66ea3b0
1 #! /bin/sh
3 dir=`dirname $0`
5 $dir/../../tests/filter_stderr_basic |
7 # Anonymise addresses
8 $dir/../../tests/filter_addresses |
10 # Perform Solaris-specific filtering.
11 if $dir/../../tests/os_test solaris; then
12 perl -p $dir/filter_stderr_solaris
13 else
14 cat
15 fi |
17 # get rid of the numbers in bits of text "Thread #n", "thread #n",
18 # "Thread n" and "thread n", "tid n"
19 # as these make some tests more scheduling sensitive -- those where
20 # there are multiple threads which play interchangeable roles.
21 sed \
22 -e "s/tid [0-9][0-9]*/tid #x/g" \
23 -e "s/hread #[0-9][0-9]*/hread #x/g" \
24 -e "s/hread [0-9][0-9]*/hread x/g" |
26 # Likewise for frame numbers, which depend on compilation.
27 sed -e "s/frame #[0-9][0-9]*/frame #x/g" | \
29 # Remove the message that more than hundred errors have been detected
30 # (consists of two lines) and also the empty line above it.
31 awk 'BEGIN{begin=1} {if ($0 == "More than 100 errors detected. Subsequent errors") { getline; getline; } else { if (begin) begin = 0; else print last_line; }; last_line = $0; } END { if (! begin) print last_line; }' |
33 # Merge sem_wait and sem_wait@*, as either could be used. Likewise for
34 # sem_post.
35 sed \
36 -e "s/sem_wait@\*/sem_wait/" \
37 -e "s/sem_post@\*/sem_post/" |
39 # Remove "Helgrind, ..." line and the following copyright line;
40 # also the standard postamble (does such a word exist?)
41 # And also remove pthread_create_WRK lines, as ppc64 stacktraces
42 # do not contain them (at least on gcc110/fedora18).
43 sed \
44 -e "/^Helgrind, a thread error detector/ , /./ d" \
45 -e "/^For counts of detected and suppressed errors, rerun with: -v$/d" \
46 -e "/^Use --history-level=approx or =none to gain increased speed, at$/d" \
47 -e "/^the cost of reduced accuracy of conflicting-access information$/d" \
48 -e "/pthread_create_WRK (hg_intercepts.c:/d" |
50 # Some arches return ENOSYS instead of EINVAL for undefined futex operations.
51 sed -e "s/with error code 38 (ENOSYS: Function not implemented)/with error code 22 (EINVAL: Invalid argument)/" |
53 $dir/../../helgrind/tests/filter_helgrind "$@"
55 exit 0