All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gummerer <t.gummerer@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
	"Git Mailing List" <git@vger.kernel.org>,
	szeder.dev@gmail.com, "Jan Palus" <jpalus@fastmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: [PATCH 2/1] Revert "t/lib-git-daemon: record daemon log"
Date: Sun, 6 Jan 2019 17:53:10 +0000	[thread overview]
Message-ID: <20190106175310.GC25639@hank.intra.tgummerer.com> (raw)
In-Reply-To: <20181220164150.GB25639@hank.intra.tgummerer.com>

This reverts commit 314a73d658 (t/lib-git-daemon: record daemon log,
2018-01-25), which let tests use the output of git-daemon.

The previous commit removed the last user of deamon.log in the tests,
there's no good way to make checking for output in the log
race-proof.  Revert this commit as well, to make sure others are not
tempted to use daemon.log in tests in the future, which would lead to
racy tests.

The original commit had one change that still makes sense, namely
switching read/echo for "read -r" and "printf", which relays the data
more faithfully.  Don't revert that piece here, as it is still a
useful change.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
---
 t/lib-git-daemon.sh | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh
index f98de95c15..fd41229a8f 100644
--- a/t/lib-git-daemon.sh
+++ b/t/lib-git-daemon.sh
@@ -54,19 +54,11 @@ start_git_daemon() {
 		"$@" "$GIT_DAEMON_DOCUMENT_ROOT_PATH" \
 		>&3 2>git_daemon_output &
 	GIT_DAEMON_PID=$!
-	>daemon.log
 	{
 		read -r line <&7
-		printf "%s\n" "$line"
-		printf >&4 "%s\n" "$line"
-		(
-			while read -r line <&7
-			do
-				printf "%s\n" "$line"
-				printf >&4 "%s\n" "$line"
-			done
-		) &
-	} 7<git_daemon_output >>"$TRASH_DIRECTORY/daemon.log" &&
+		printf "%s\n" "$line" >&4
+		cat <&7 >&4 &
+	} 7<git_daemon_output &&
 
 	# Check expected output
 	if test x"$(expr "$line" : "\[[0-9]*\] \(.*\)")" != x"Ready to rumble"
-- 
2.20.1.153.gd81d796ee0

  parent reply	other threads:[~2019-01-06 17:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-25 20:52 t5570 shaky for anyone ? Torsten Bögershausen
2018-11-25 22:01 ` Thomas Gummerer
2018-11-26 16:42   ` Jeff King
2018-12-20 16:41     ` [PATCH] t5570: drop racy test Thomas Gummerer
2018-12-20 17:14       ` Jeff King
2018-12-21 15:48         ` Johannes Schindelin
2019-01-06 17:59           ` Thomas Gummerer
2019-01-06 17:53       ` Thomas Gummerer [this message]
2019-01-07  8:20         ` [PATCH 2/1] Revert "t/lib-git-daemon: record daemon log" Jeff King
2019-01-07 15:45           ` Junio C Hamano
2018-11-25 22:22 ` t5570 shaky for anyone ? SZEDER Gábor
2018-11-26 16:45   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190106175310.GC25639@hank.intra.tgummerer.com \
    --to=t.gummerer@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=jpalus@fastmail.com \
    --cc=peff@peff.net \
    --cc=szeder.dev@gmail.com \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.