When I ran "make check-valgrind -j10" and the testsuite needed to be rebuilt, two copies of it were rebuilt in parallel and sometimes they raced with each other. I don't have the full story on exactly why this happened, but this commit, which eliminates redundant dependencies from check-* targets, fixes the problem for me. The dependencies are redundant because these targets depend on "all", which also depends on them.
Signed-off-by: Ben Pfaff <b...@ovn.org> --- tests/automake.mk | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/automake.mk b/tests/automake.mk index a2b7786..f022feb 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -118,7 +118,7 @@ DISTCLEANFILES += tests/atconfig tests/atlocal AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests:$(PTHREAD_WIN32_DIR_DLL):ovn/controller-vtep:ovn/northd:ovn/utilities:ovn/controller -check-local: tests/atconfig tests/atlocal $(TESTSUITE) +check-local: set $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS); \ "$$@" || (test X'$(RECHECK)' = Xyes && "$$@" --recheck) @@ -127,7 +127,7 @@ check-local: tests/atconfig tests/atlocal $(TESTSUITE) COVERAGE = coverage COVERAGE_FILE='$(abs_srcdir)/.coverage' -check-pycov: all tests/atconfig tests/atlocal $(TESTSUITE) clean-pycov +check-pycov: all clean-pycov PYTHONDONTWRITEBYTECODE=yes COVERAGE_FILE=$(COVERAGE_FILE) PYTHON='$(COVERAGE) run -p' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS) @cd $(srcdir) && $(COVERAGE) combine && COVERAGE_FILE=$(COVERAGE_FILE) $(COVERAGE) annotate @echo @@ -145,7 +145,7 @@ clean-lcov: LCOV_OPTS = -b $(abs_top_builddir) -d $(abs_top_builddir) -q -c --rc lcov_branch_coverage=1 GENHTML_OPTS = -q --branch-coverage --num-spaces 4 -check-lcov: all tests/atconfig tests/atlocal $(TESTSUITE) $(check_DATA) clean-lcov +check-lcov: all $(check_DATA) clean-lcov find . -name '*.gcda' | xargs -n1 rm -f -set $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS); \ "$$@" || (test X'$(RECHECK)' = Xyes && "$$@" --recheck) @@ -217,8 +217,7 @@ 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) +check-valgrind: all $(valgrind_wrappers) $(check_DATA) $(SHELL) '$(TESTSUITE)' -C tests CHECK_VALGRIND=true VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) @echo @echo '----------------------------------------------------------------------' @@ -241,7 +240,7 @@ check-ryu: all EXTRA_DIST += tests/run-ryu # Run kmod tests. Assume kernel modules has been installed or linked into the kernel -check-kernel: all tests/atconfig tests/atlocal $(SYSTEM_KMOD_TESTSUITE) +check-kernel: all set $(SHELL) '$(SYSTEM_KMOD_TESTSUITE)' -C tests AUTOTEST_PATH='$(AUTOTEST_PATH)' $(TESTSUITEFLAGS) -j1; \ "$$@" || (test X'$(RECHECK)' = Xyes && "$$@" --recheck) @@ -251,7 +250,7 @@ check-kmod: all tests/atconfig tests/atlocal $(SYSTEM_KMOD_TESTSUITE) modprobe -r -a vport-geneve vport-gre vport-lisp vport-stt vport-vxlan openvswitch $(MAKE) check-kernel -check-system-userspace: all tests/atconfig tests/atlocal $(SYSTEM_USERSPACE_TESTSUITE) +check-system-userspace: all set $(SHELL) '$(SYSTEM_USERSPACE_TESTSUITE)' -C tests AUTOTEST_PATH='$(AUTOTEST_PATH)' $(TESTSUITEFLAGS) -j1; \ "$$@" || (test X'$(RECHECK)' = Xyes && "$$@" --recheck) -- 2.1.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev