Re: [RFC PATCH 3/3] test-lib: add the '--stress' option to run a test repeatedly under load
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Dec 5, 2018, 10:34 UTC
- Message-ID
- <20181205103454.GJ30222@szeder.dev>
- In-Reply-To
- <20181205054408.GE12284@sigill.intra.peff.net>
Just a quick reply to this one point for now:
On Wed, Dec 05, 2018 at 12:44:09AM -0500, Jeff King wrote:
Show 10 quoted lines
> On Tue, Dec 04, 2018 at 05:34:57PM +0100, SZEDER Gábor wrote: > > + job_nr=0 > > + while test $job_nr -lt "$job_count" > > + do > > + wait > > + job_nr=$(($job_nr + 1)) > > + done > > Do we need to loop? Calling "wait" with no arguments should wait for all > children.
It should, but in dash, ksh, ksh93, Bash v4.2 or older it doesn't seem to do so, at least not on my machine, and I get back my shell prompt right after hitting ctrl-C or the first failed test, and then get the progress output from the remaining jobs later.
Bash 4.3 or later are strange: I get back the shell prompt immediately after ctrl-C as well, so it doesn't appear to be waiting for all remaining jobs to finish either, but! I don't get any of the progress output from those jobs to mess up my next command.
And mksh and zsh can't run our tests, and I don't have any more shells at hand to try.