Message ID | 1512999847-24034-1-git-send-email-pkusunyifeng@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,1/2] valgrind: Add support to run kernel datapath testsuite under valgrind | expand |
On 12/11/2017 5:44 AM, Yifeng Sun wrote: > 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> > --- > Documentation/topics/testing.rst | 4 ++++ > tests/automake.mk | 7 +++++++ > 2 files changed, 11 insertions(+) Looks good and tests out OK for me. Tested-by: Greg Rose <gvrose8192@gmail.com Reviewed-by: Greg Rose <gvrose8192@gmail.com> > > diff --git a/Documentation/topics/testing.rst b/Documentation/topics/testing.rst > index 85aa6a1fb495..6645b794a07f 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 7eed1064e82b..0acafca100d3 100644 > --- a/tests/automake.mk > +++ b/tests/automake.mk > @@ -214,6 +214,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) >
On Tue, Dec 12, 2017 at 10:59:08AM -0800, Gregory Rose wrote: > On 12/11/2017 5:44 AM, Yifeng Sun wrote: > >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> > >--- > > Documentation/topics/testing.rst | 4 ++++ > > tests/automake.mk | 7 +++++++ > > 2 files changed, 11 insertions(+) > > Looks good and tests out OK for me. > > Tested-by: Greg Rose <gvrose8192@gmail.com > Reviewed-by: Greg Rose <gvrose8192@gmail.com> Thanks Yifeng and Greg, I applied this to master.
diff --git a/Documentation/topics/testing.rst b/Documentation/topics/testing.rst index 85aa6a1fb495..6645b794a07f 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 7eed1064e82b..0acafca100d3 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -214,6 +214,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)
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> --- Documentation/topics/testing.rst | 4 ++++ tests/automake.mk | 7 +++++++ 2 files changed, 11 insertions(+)