From 458f87ca2fbbc671032394fa6f4e59070079bf71 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 13 Jul 2011 10:43:49 +0000 Subject: [PATCH] drd: add a test that verifies that a race is reported for the annotate_smart_pointer test program with annotations disabled git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11896 --- drd/tests/Makefile.am | 2 ++ drd/tests/annotate_smart_pointer2.stderr.exp | 10 ++++++++++ drd/tests/annotate_smart_pointer2.vgtest | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 drd/tests/annotate_smart_pointer2.stderr.exp create mode 100644 drd/tests/annotate_smart_pointer2.vgtest diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index 2a259558b..836aeae30 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -33,6 +33,8 @@ EXTRA_DIST = \ annotate_publish_hg.vgtest \ annotate_smart_pointer.stderr.exp \ annotate_smart_pointer.vgtest \ + annotate_smart_pointer2.stderr.exp \ + annotate_smart_pointer2.vgtest \ annotate_spinlock.stderr.exp \ annotate_spinlock.vgtest \ annotate_rwlock.stderr.exp \ diff --git a/drd/tests/annotate_smart_pointer2.stderr.exp b/drd/tests/annotate_smart_pointer2.stderr.exp new file mode 100644 index 000000000..c06d93816 --- /dev/null +++ b/drd/tests/annotate_smart_pointer2.stderr.exp @@ -0,0 +1,10 @@ + +Conflicting store by thread x at 0x........ size 4 + at 0x........: main (annotate_smart_pointer.cpp:?) +Address 0x........ is at offset 24 from 0x......... Allocation context: + at 0x........: ...operator new... (vg_replace_malloc.c:...) + by 0x........: main (annotate_smart_pointer.cpp:?) + +Done. + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/drd/tests/annotate_smart_pointer2.vgtest b/drd/tests/annotate_smart_pointer2.vgtest new file mode 100644 index 000000000..6ba234ecb --- /dev/null +++ b/drd/tests/annotate_smart_pointer2.vgtest @@ -0,0 +1,5 @@ +prereq: test -e annotate_smart_pointer && ./supported_libpthread +vgopts: --read-var-info=yes --check-stack-var=yes --show-confl-seg=no +prog: annotate_smart_pointer +args: 1 1 0 +stderr_filter: filter_stderr_and_thread_no