]> git.proxmox.com Git - ovs.git/commitdiff
valgrind: Add support to run kernel datapath testsuite under valgrind
authorYifeng Sun <pkusunyifeng@gmail.com>
Mon, 11 Dec 2017 13:44:06 +0000 (05:44 -0800)
committerBen Pfaff <blp@ovn.org>
Wed, 20 Dec 2017 17:35:10 +0000 (09:35 -0800)
With this patch, kernel datapath testsuite can be run under valgrind by using
the "check-kernel-valgrind" target and the results can be found under directory
"tests/system-kmod-testsuite.dir/".

Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Tested-by: Greg Rose <gvrose8192@gmail.com
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
Documentation/topics/testing.rst
tests/automake.mk

index 1ecda00d069c7c7b5ed5126c56c6d1f64229a22d..a49336b7989eec80be7e06a693374df324b113b8 100644 (file)
@@ -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::
index c1a2357e1c46d1f34c385485e3d33cb83b21692b..8157641d94f9c306a2604832623a6f446067edb2 100644 (file)
@@ -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)