summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2016-04-29 22:13:46 -0700
committerBen Pfaff <blp@ovn.org>2016-05-17 17:03:17 -0700
commit5bdcef15886804afc3975d67adadcf905f5da280 (patch)
tree68934ba1282e0047779903937331042374be304f /tests
parentb3632186562a6ea2a3e115a3d7f594825664dc1a (diff)
downloadopenvswitch-5bdcef15886804afc3975d67adadcf905f5da280.tar.gz
tests: Add support for helgrind thread error detector.
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> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/automake.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/automake.mk b/tests/automake.mk
index 1b147f6e9..7af7f69c0 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -208,6 +208,9 @@ 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)
@@ -216,6 +219,10 @@ check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) \
@echo '----------------------------------------------------------------------'
@echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
@echo '----------------------------------------------------------------------'
+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.