Skip to content

Commit 3fae7ad

Browse files
szedergitster
authored andcommitted
git p4 test: disable '-x' tracing in the p4d watchdog loop
According to the comments in 't/lib-git-p4.sh', sometimes 'p4d' seems to hang, and to deal with that 'start_p4d' starts a watchdog process to kill it after a long-enough timeout ($P4D_TIMEOUT, defaults to 300s). This watchdog process is implemented as a background subshell loop iterating once every second until the timeout expires, producing a few lines of trace output on each iteration when the test script is run with '-x' tracing enabled. The watchdog loop's trace gets intermixed with the real test output and trace, and makes that harder to read. Send the trace output of this loop to /dev/null to avoid polluting the real test output. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 0e67c32 commit 3fae7ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/lib-git-p4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ start_p4d () {
106106
fi
107107
sleep 1
108108
nr_tries_left=$(($nr_tries_left - 1))
109-
done &
109+
done 2>/dev/null 4>&2 &
110110
watchdog_pid=$!
111111

112112
ready=

0 commit comments

Comments
 (0)