summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/topics/testing.rst4
-rw-r--r--tests/automake.mk7
2 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/topics/testing.rst b/Documentation/topics/testing.rst
index 1ecda00d0..a49336b79 100644
--- a/Documentation/topics/testing.rst
+++ b/Documentation/topics/testing.rst
@@ -118,6 +118,10 @@ valgrind by using the ``check-valgrind`` target::
When you do this, the "valgrind" results for test ``<N>`` are reported in files
named ``tests/testsuite.dir/<N>/valgrind.*``.
+To test the testsuite of kernel datapath under valgrind, you can use the
+``check-kernel-valgrind`` target and find the "valgrind" results under
+directory ``tests/system-kmod-testsuite.dir/``.
+
All the same options are available via TESTSUITEFLAGS.
.. hint::
diff --git a/tests/automake.mk b/tests/automake.mk
index c1a2357e1..8157641d9 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -215,6 +215,13 @@ check-valgrind: all $(valgrind_wrappers) $(check_DATA)
@echo '----------------------------------------------------------------------'
@echo 'Valgrind output can be found in tests/testsuite.dir/*/valgrind.*'
@echo '----------------------------------------------------------------------'
+check-kernel-valgrind: all $(valgrind_wrappers) $(check_DATA)
+ set $(SHELL) '$(SYSTEM_KMOD_TESTSUITE)' -C tests VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) -j1; \
+ "$$@" || (test X'$(RECHECK)' = Xyes && "$$@" --recheck)
+ @echo
+ @echo '----------------------------------------------------------------------'
+ @echo 'Valgrind output can be found in tests/system-kmod-testsuite.dir/*/valgrind.*'
+ @echo '----------------------------------------------------------------------'
check-helgrind: all $(valgrind_wrappers) $(check_DATA)
-$(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(HELGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)