t5552: suppress upload-pack trace output
commitb6e7fc4fc892dfaeb716101fa77653183a374c78
authorJeff King <peff@peff.net>
Fri, 10 Aug 2018 14:09:08 +0000 (10 10:09 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Aug 2018 18:14:46 +0000 (10 11:14 -0700)
tree5115cc340a030f78de357873e7a22e84604d6591
parent42cc7485a2ec49ecc440c921d2eb0cae4da80549
t5552: suppress upload-pack trace output

The t5552 test script uses GIT_TRACE_PACKET to monitor what
git-fetch sends and receives. However, because we're
accessing a local repository, the child upload-pack also
sends trace output to the same file.

On Linux, this works out OK. We open the trace file with
O_APPEND, so all writes are atomically positioned at the end
of the file. No data can be overwritten or omitted. And
since we prepare our small writes in a strbuf and write them
with a single write(), we should see each line as an atomic
unit. The order of lines between the two processes is
undefined, but the test script greps only for "fetch>" or
"fetch<" lines. So under Linux, the test results are
deterministic.

The test fails intermittently on Windows, however,
reportedly even overwriting bits of the output file (i.e.,
O_APPEND does not seem to give us an atomic position+write).

Since the test only cares about the trace output from fetch,
we can just disable the output from upload-pack. That
doesn't solve the greater question of O_APPEND/trace issues
under Windows, but it easily fixes the flakiness from this
test.

Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5552-skipping-fetch-negotiator.sh