From: Stephan Beyer Date: Thu, 24 Sep 2015 00:20:17 GMT Subject: [PATCH] t5561: get rid of racy appending to logfile Message-ID: <1443054017-8312-1-git-send-email-s-beyer@gmx.net> In-Reply-To: <20150923232443.GA21755@sigill.intra.peff.net> The definition of log_div() appended information to the web server's logfile to make the test more readable. However, it could happen that this information is written before the web server writes its log line (this consistently happens with a PROFILE=GEN build), and hence the test failed. To get rid of this behavior, the logfile is not touched at all. This commit removes log_div() and its calls. The readability-improving information is kept in the test but filtered out before comparing it to the actual logfile. Signed-off-by: Stephan Beyer --- 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..b870410 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 <