From: Bart Van Assche Date: Fri, 7 Mar 2008 17:34:22 +0000 (+0000) Subject: Added more atomic read/modify/write tests. X-Git-Tag: svn/VALGRIND_3_4_0~958 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=02850f340c59b19ac17f5ee7ba086d0a9e44574c;p=thirdparty%2Fvalgrind.git Added more atomic read/modify/write tests. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7582 --- diff --git a/exp-drd/tests/Makefile.am b/exp-drd/tests/Makefile.am index 0f11435069..ac487c5e34 100644 --- a/exp-drd/tests/Makefile.am +++ b/exp-drd/tests/Makefile.am @@ -116,6 +116,11 @@ EXTRA_DIST = \ tc06_two_races.stderr.exp \ tc06_two_races.stderr.exp-linuxthreads \ tc06_two_races.vgtest \ + tc07_hbl1.stderr.exp \ + tc07_hbl1.stdout.exp \ + tc07_hbl1.vgtest \ + tc08_hbl2.stderr.exp \ + tc08_hbl2.vgtest \ tc09_bad_unlock.stderr.exp \ tc09_bad_unlock.stderr.exp-linuxthreads \ tc09_bad_unlock.vgtest \ @@ -169,12 +174,6 @@ EXTRA_DIST = \ trylock.c trylock.stderr.exp \ trylock.stderr.exp-linuxthreads -# tc07_hbl1.vgtest -# tc07_hbl1.stderr.exp tc07_hbl1.stdout.exp -# tc07_hbl1.stderr.exp -# tc08_hbl2.vgtest -# tc08_hbl2.stderr.exp - AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI) AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include AM_CXXFLAGS = $(AM_CFLAGS) @@ -203,6 +202,8 @@ check_PROGRAMS = \ tc04_free_lock \ tc05_simple_race \ tc06_two_races \ + tc07_hbl1 \ + tc08_hbl2 \ tc09_bad_unlock \ tc10_rec_lock \ tc11_XCHG \ @@ -220,8 +221,6 @@ check_PROGRAMS = \ tc24_nonzero_sem \ trylock -# tc07_hbl1 -- requires bus locking support. -# tc08_hbl2 -- requires bus locking support. # tc14_laog_dinphils -- hangs. @@ -294,11 +293,11 @@ tc05_simple_race_LDADD = -lpthread tc06_two_races_SOURCES = ../../helgrind/tests/tc06_two_races.c tc06_two_races_LDADD = -lpthread -# tc07_hbl1_SOURCES = ../../helgrind/tests/tc07_hbl1.c -# tc07_hbl1_LDADD = -lpthread +tc07_hbl1_SOURCES = ../../helgrind/tests/tc07_hbl1.c +tc07_hbl1_LDADD = -lpthread -# tc08_hbl2_SOURCES = ../../helgrind/tests/tc08_hbl2.c -# tc08_hbl2_LDADD = -lpthread +tc08_hbl2_SOURCES = ../../helgrind/tests/tc08_hbl2.c +tc08_hbl2_LDADD = -lpthread tc09_bad_unlock_SOURCES = ../../helgrind/tests/tc09_bad_unlock.c tc09_bad_unlock_LDADD = -lpthread diff --git a/exp-drd/tests/tc07_hbl1.stderr.exp b/exp-drd/tests/tc07_hbl1.stderr.exp index d74ef1c06d..d18786f806 100644 --- a/exp-drd/tests/tc07_hbl1.stderr.exp +++ b/exp-drd/tests/tc07_hbl1.stderr.exp @@ -1,18 +1,3 @@ -Conflicting load by thread 1 at 0x........ size 4 - at 0x........: main (tc07_hbl1.c:68) -Allocation context: x (offset 0, size 4) in tc07_hbl1, NONE:BSS -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) -Conflicting store by thread 1 at 0x........ size 4 - at 0x........: main (tc07_hbl1.c:68) -Allocation context: x (offset 0, size 4) in tc07_hbl1, NONE:BSS -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/exp-drd/tests/tc07_hbl1.vgtest b/exp-drd/tests/tc07_hbl1.vgtest new file mode 100644 index 0000000000..71c463f810 --- /dev/null +++ b/exp-drd/tests/tc07_hbl1.vgtest @@ -0,0 +1 @@ +prog: tc07_hbl1 diff --git a/exp-drd/tests/tc08_hbl2.stderr.exp b/exp-drd/tests/tc08_hbl2.stderr.exp index 89685d17c2..d18786f806 100644 --- a/exp-drd/tests/tc08_hbl2.stderr.exp +++ b/exp-drd/tests/tc08_hbl2.stderr.exp @@ -1 +1,3 @@ -ERROR SUMMARY: 16 errors from 16 contexts + + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/exp-drd/tests/tc08_hbl2.vgtest b/exp-drd/tests/tc08_hbl2.vgtest new file mode 100644 index 0000000000..6d0a2cb773 --- /dev/null +++ b/exp-drd/tests/tc08_hbl2.vgtest @@ -0,0 +1 @@ +prog: tc08_hbl2