From patchwork Thu Oct 6 01:28:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 678690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3sqFQr3Yncz9s2Q for ; Thu, 6 Oct 2016 12:28:20 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id BA5101077B; Wed, 5 Oct 2016 18:28:19 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id D010510771 for ; Wed, 5 Oct 2016 18:28:18 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 67B81162AAD for ; Wed, 5 Oct 2016 19:28:18 -0600 (MDT) X-ASG-Debug-ID: 1475717297-0b3237258c4cfc0001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id zMQ2MycTDBgL1eD7 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 05 Oct 2016 19:28:17 -0600 (MDT) X-Barracuda-Envelope-From: blp@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO relay5-d.mail.gandi.net) (217.70.183.197) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 6 Oct 2016 01:28:17 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at ovn.org designates 217.70.183.197 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.197 X-Barracuda-RBL-IP: 217.70.183.197 Received: from mfilter38-d.gandi.net (mfilter38-d.gandi.net [217.70.178.169]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 645DE41C074; Thu, 6 Oct 2016 03:28:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter38-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter38-d.gandi.net (mfilter38-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id INhXz-zr1_7s; Thu, 6 Oct 2016 03:28:14 +0200 (CEST) X-Originating-IP: 173.228.112.90 Received: from sigabrt.gateway.sonic.net (173-228-112-90.dsl.dynamic.fusionbroadband.com [173.228.112.90]) (Authenticated sender: blp@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 5069041C07F; Thu, 6 Oct 2016 03:28:13 +0200 (CEST) X-CudaMail-Envelope-Sender: blp@ovn.org From: Ben Pfaff To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-1004061861 X-CudaMail-DTE: 100516 X-CudaMail-Originating-IP: 217.70.183.197 Date: Wed, 5 Oct 2016 18:28:17 -0700 X-ASG-Orig-Subj: [##CM-V1-1004061861##][PATCH] tests: Fix double-rebuild of testsuite for "check-valgrind". Message-Id: <1475717297-30287-1-git-send-email-blp@ovn.org> X-Mailer: git-send-email 2.1.3 X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1475717297 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH] tests: Fix double-rebuild of testsuite for "check-valgrind". X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" 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 --- 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)