Re: [PATCH v2] t6026-merge-attr: don't fail if sleep exits early
- From
Jeff King <peff@peff.net>
- Date
- Nov 10, 2016, 22:35 UTC
- Message-ID
- <20161110223522.4b35ojaz5nhk4sll@sigill.intra.peff.net>
- In-Reply-To
- <xmqq60nv55o3.fsf@gitster.mtv.corp.google.com>
On Thu, Nov 10, 2016 at 02:30:36PM -0800, Junio C Hamano wrote:
Show 8 quoted lines
> As everybody knows there is no appropriate timeout value that is > good for everybody. I wonder if we can replace the sleep 1 with > something like > > ( while sleep 3600; do :; done ) & > > so that leaked fd will be kept even in any heavily loaded > environment instead?
I think you may have missed:
http://public-inbox.org/git/16dc9f159b214997f7501006a8d1d8be2ef858e8.1478699463.git.johannes.schindelin@gmx.de/
which does roughly that. It does not loop, but I suspect 3600 is plenty in practice.
I do think the test would be a lot more obvious if it confirmed at the end of the test that the process was still running, as opposed to relying on test_when_finished to check it.
-Peff