Commits

Junio C Hamano  committed 6a88021 Merge

Merge branch 'js/daemon-test-race-fix' into maint

The test scaffolding for git-daemon was flaky.

By Johannes Sixt
* js/daemon-test-race-fix:
t5570: fix forwarding of git-daemon messages via cat

  • Participants
  • Parent commits 4c8ad06, 46e3581

Comments (0)

Files changed (1)

File t/lib-git-daemon.sh

 		>&3 2>git_daemon_output &
 	GIT_DAEMON_PID=$!
 	{
-		read line
+		read line <&7
 		echo >&4 "$line"
-		cat >&4 &
+		cat <&7 >&4 &
+	} 7<git_daemon_output &&
 
-		# Check expected output
-		if test x"$(expr "$line" : "\[[0-9]*\] \(.*\)")" != x"Ready to rumble"
-		then
-			kill "$GIT_DAEMON_PID"
-			wait "$GIT_DAEMON_PID"
-			trap 'die' EXIT
-			error "git daemon failed to start"
-		fi
-	} <git_daemon_output
+	# Check expected output
+	if test x"$(expr "$line" : "\[[0-9]*\] \(.*\)")" != x"Ready to rumble"
+	then
+		kill "$GIT_DAEMON_PID"
+		wait "$GIT_DAEMON_PID"
+		trap 'die' EXIT
+		error "git daemon failed to start"
+	fi
 }
 
 stop_git_daemon() {