From: Bart Van Assche Date: Sat, 22 Oct 2011 16:29:11 +0000 (+0000) Subject: Add a custom filter for the drd/tests/annotate_barrier_xml regression test X-Git-Tag: svn/VALGRIND_3_7_0~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25c42056c0c9579761b99acbe2a551c3a8f90d87;p=thirdparty%2Fvalgrind.git Add a custom filter for the drd/tests/annotate_barrier_xml regression test git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12200 --- diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index eadb34ab32..94b2f3d263 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -3,6 +3,7 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = \ compare_error_count_with \ + filter_annotate_barrier_xml \ filter_error_count \ filter_error_summary \ filter_stderr \ diff --git a/drd/tests/annotate_barrier_xml.stderr.exp b/drd/tests/annotate_barrier_xml.stderr.exp index 4b884b24da..52e49506d9 100644 --- a/drd/tests/annotate_barrier_xml.stderr.exp +++ b/drd/tests/annotate_barrier_xml.stderr.exp @@ -189,9 +189,6 @@ 0x........ ... start_thread - ... - pthread_create.c - ... Address 0x........ is at offset 0 from 0x......... diff --git a/drd/tests/annotate_barrier_xml.vgtest b/drd/tests/annotate_barrier_xml.vgtest index f0ec0ce3d5..1cab1599d4 100644 --- a/drd/tests/annotate_barrier_xml.vgtest +++ b/drd/tests/annotate_barrier_xml.vgtest @@ -1,4 +1,4 @@ prereq: test -e annotate_barrier && ./supported_libpthread vgopts: --read-var-info=yes --check-stack-var=yes --show-confl-seg=no --num-callers=3 --xml=yes --xml-fd=2 prog: annotate_barrier 2 1 1 -stderr_filter: ../../memcheck/tests/filter_xml +stderr_filter: filter_annotate_barrier_xml diff --git a/drd/tests/filter_annotate_barrier_xml b/drd/tests/filter_annotate_barrier_xml new file mode 100755 index 0000000000..06a492ae8b --- /dev/null +++ b/drd/tests/filter_annotate_barrier_xml @@ -0,0 +1,33 @@ +#!/bin/sh + +# Remove the three lines after "start_thread" if these start with +# "..." since these last three lines are not generated on all +# platforms. +../../memcheck/tests/filter_xml | +awk '{ + if ($0 == " start_thread") { + line1 = $0 + getline + if ($0 == " ...") { + line2 = $0 + getline + if ($0 == " pthread_create.c") { + line3 = $0 + getline + if ($0 == " ...") { + $0 = line1 + } else { + print line1 + print line2 + print line3 + } + } else { + print line1 + print line2 + } + } else { + print line1 + } + } + print + }'