diff mbox

[ovs-dev] Helgrind: Add support for thread error detector.

Message ID 1461993226-1583-1-git-send-email-u9012063@gmail.com
State Accepted
Headers show

Commit Message

William Tu April 30, 2016, 5:13 a.m. UTC
Helgrind is a Valgrind tool for detecting thread errors, reporting three
classes of errors: misuses of the POSIX pthreads API, potential deadlocks
arising from lock ordering problems, and data races -- accessing memory
without adequate locking.  Similar to valgrind, users do "make check-helgrind"
and results will be saved at tests/testsuite.dir/<N>/helgrind.*.

Signed-off-by: William Tu <u9012063@gmail.com>
---
 tests/automake.mk | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Ben Pfaff May 18, 2016, 12:05 a.m. UTC | #1
On Fri, Apr 29, 2016 at 10:13:46PM -0700, William Tu wrote:
> Helgrind is a Valgrind tool for detecting thread errors, reporting three
> classes of errors: misuses of the POSIX pthreads API, potential deadlocks
> arising from lock ordering problems, and data races -- accessing memory
> without adequate locking.  Similar to valgrind, users do "make check-helgrind"
> and results will be saved at tests/testsuite.dir/<N>/helgrind.*.
> 
> Signed-off-by: William Tu <u9012063@gmail.com>

Applied, thanks!
diff mbox

Patch

diff --git a/tests/automake.mk b/tests/automake.mk
index 52be78e..046b33d 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -204,11 +204,18 @@  EXTRA_DIST += tests/valgrind-wrapper.in
 VALGRIND = valgrind --log-file=valgrind.%p --leak-check=full \
 	--suppressions=$(abs_top_srcdir)/tests/glibc.supp \
 	--suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
+HELGRIND = valgrind --log-file=helgrind.%p --tool=helgrind \
+	--suppressions=$(abs_top_srcdir)/tests/glibc.supp \
+	--suppressions=$(abs_top_srcdir)/tests/openssl.supp --num-callers=20
 EXTRA_DIST += tests/glibc.supp tests/openssl.supp
 check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \
                 $(valgrind_wrappers) $(check_DATA)
 	-$(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
 	@EGREP='$(EGREP)' $(SHELL) $(abs_top_srcdir)/tests/valgrind-parse.sh
+check-helgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \
+                $(valgrind_wrappers) $(check_DATA)
+	-$(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(HELGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
+
 
 # OFTest support.