From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Beyer Subject: [PATCH] t5561: get rid of racy appending to logfile Date: Fri, 25 Sep 2015 01:31:33 +0200 Message-ID: <1443137493-2648-1-git-send-email-s-beyer@gmx.net> Cc: git@vger.kernel.org, Stephan Beyer To: gitster@pobox.com X-From: git-owner@vger.kernel.org Fri Sep 25 01:34:27 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZfG1u-0002gV-2K for gcvg-git-2@plane.gmane.org; Fri, 25 Sep 2015 01:34:22 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754093AbbIXXeR (ORCPT ); Thu, 24 Sep 2015 19:34:17 -0400 Received: from mout.gmx.net ([212.227.17.22]:51164 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753295AbbIXXeQ (ORCPT ); Thu, 24 Sep 2015 19:34:16 -0400 Received: from fermat.fritz.box ([88.71.231.156]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0Lp8h6-1aHdi40gvU-00epnY; Fri, 25 Sep 2015 01:34:12 +0200 X-Mailer: git-send-email 2.6.0.rc3.dirty X-Provags-ID: V03:K0:qE2WBogR468RGBbjumWwlhucQ7i5XhLBXs7lujdXcCr0f0d1M8H Sg9i4qPQLWi/035yAuJmntxoVvXff+WEffkuLCXHsfvSPhzKmHD72jVUZbLMw1M+tnGTC6e tUAzqTQ471wDQ9B+y4Kuq8MVXskJwAdRhu1AGmhQepiiAreWWSK8fr8QDL8eTszuEdFYMxM dj+f2JN/BPCG6Md2mzsEA== X-UI-Out-Filterresults: notjunk:1;V01:K0:uplopvUBJKM=:lq9K5ZXq3hFcKRkGjTCvun e6+eL4cv9ob8gqRXom1VH0vJW4pTFG8WB9cgYPQs+reCgd2y8XlfmKYReJc4nGNgclqDBIcoz 2sfpqa9gutDGEZtExOjE9HKCO2zY8LGITIQURn5fbGXJfrOHz7e/ePcst21GXdEZ4W7rbwwku 8O58H2aQmThuR7tUNaq+n9t89T6K+ULT28eWjvLtPPJ5ONT0XwN5tcAA5Qg5YO6reWbhqNcMK 8UqD9VGwiuU64p8cpaBk7Xbg0+CVlVMbOmJOEBhS8Cn/HH96n4wZizoRgALLF2QlEiM0GFOez 3DMNc2DeaIPA8Hl3+2wfPl//Kmy/0uzIjIykfnxX2iu1a2XRSobbhX2zxHaBpqyILO3orw33d sjpNqIRqZAtVTXU9O65TcI9u66W2gJscpB3qYN4d8V4S3DkqkNhsGnBwSWrPPLaB29se7T29G 1mLOodaEOEyyb1vprTaotmgnFb1ZtL0k1X5OMmMPyNv87BiqoasKpaZHEA90QqmX8hJVLLG7m QB1N0ci6+xIeFm2o1ircnaPEv0KrYt8BG1CCgsZMK+pddoo5y+D/h5Zg2yHhfOuSUg7fx6gAy t+cNswrIYY8yMPl9S1tlHS2ihepIieQGd2Hz3y9+TbsJy8CspNj3Racrmq2O3FEI3gvCdjO1j HR0mz9ITWWioGOVv4L4W2MM9mPc2iEo2C2na6akiW8fJ4pWh//99JW3qX+ndPLyW9E0B9+pYo uumNFePcB7Ik87/V Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: The definition of log_div() appended information to the web server's logfile to make the test more readable. However, log_div() was called right after a request is served (which is done by git-http-backend); the web server waits for the git-http-backend process to exit before it writes to the log file. When the duration between serving a request and exiting was long, the log_div() output was written before the last request's log, and the test failed. (This duration could become especially long for PROFILE=GEN builds.) To get rid of this behavior, we should not change the logfile at all. This commit removes log_div() and its calls. The additional information is kept in the test (for readability reasons) but filtered out before comparing it to the actual logfile. Signed-off-by: Stephan Beyer Acked-by: Jeff King --- SubmittingPatches says that when there is consensus the patch has to be resent to Junio and cc'ed to the list. Here it is (although I don't know if there is consensus, but, hey, it's a rather trivial patch, so it should be okay). See http://git.661346.n2.nabble.com/t5561-failing-after-make-PROFILE-GEN-td7640150.html for the original thread. Compared to the last version, I only added the Acked-by line. t/t5560-http-backend-noserver.sh | 4 ---- t/t5561-http-backend.sh | 8 +------- t/t556x_common | 12 ------------ 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh index aa73eea..9fafcf1 100755 --- a/t/t5560-http-backend-noserver.sh +++ b/t/t5560-http-backend-noserver.sh @@ -44,10 +44,6 @@ POST() { test_cmp exp act } -log_div() { - return 0 -} - . "$TEST_DIRECTORY"/t556x_common expect_aliased() { diff --git a/t/t5561-http-backend.sh b/t/t5561-http-backend.sh index 19afe96..73dcb29 100755 --- a/t/t5561-http-backend.sh +++ b/t/t5561-http-backend.sh @@ -29,15 +29,9 @@ POST() { test_cmp exp act } -log_div() { - echo >>"$HTTPD_ROOT_PATH"/access.log - echo "### $1" >>"$HTTPD_ROOT_PATH"/access.log - echo "###" >>"$HTTPD_ROOT_PATH"/access.log -} - . "$TEST_DIRECTORY"/t556x_common -cat >exp <exp <