Skip to content
  • Johannes Schindelin's avatar
    tests: teach the test-tool to generate NUL bytes and use it · d5cfd142
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    In cc95bc20
    
     (t5562: replace /dev/zero with a pipe from
    generate_zero_bytes, 2019-02-09), we replaced usage of /dev/zero (which
    is not available on NonStop, apparently) by a Perl script snippet to
    generate NUL bytes.
    
    Sadly, it does not seem to work on NonStop, as t5562 reportedly hangs.
    
    Worse, this also hangs in the Ubuntu 16.04 agents of the CI builds on
    Azure Pipelines: for some reason, the Perl script snippet that is run
    via `generate_zero_bytes` in t5562's 'CONTENT_LENGTH overflow ssite_t'
    test case tries to write out an infinite amount of NUL bytes unless a
    broken pipe is encountered, that snippet never encounters the broken
    pipe, and keeps going until the build times out.
    
    Oddly enough, this does not reproduce on the Windows and macOS agents,
    nor in a local Ubuntu 18.04.
    
    This developer tried for a day to figure out the exact circumstances
    under which this hang happens, to no avail, the details remain a
    mystery.
    
    In the end, though, what counts is that this here change incidentally
    fixes that hang (maybe also on NonStop?). Even more positively, it gets
    rid of yet another unnecessary Perl invocation.
    
    Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    d5cfd142