Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-24 Thread Adam Spiers
On Mon, Apr 22, 2013 at 11:03:44AM -0700, Junio C Hamano wrote: > Adam Spiers writes: > > > On Thu, Apr 11, 2013 at 03:11:32PM -0400, Jeff King wrote: > >> I always get a little nervous with sleeps in the test suite, as they are > >> indicative that we are trying to avoid some race condition, whi

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-22 Thread Junio C Hamano
Adam Spiers writes: > On Thu, Apr 11, 2013 at 03:11:32PM -0400, Jeff King wrote: >> I always get a little nervous with sleeps in the test suite, as they are >> indicative that we are trying to avoid some race condition, which means >> that the test can fail when the system is under load, or when

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 05:04:30PM -0400, Aaron Schrab wrote: > At 13:05 +0100 11 Apr 2013, Adam Spiers wrote: > >The above use case suggests that empty STDIN is actually a reasonable > >scenario (e.g. when the caller doesn't know in advance whether any > >queries need to be fed to the background

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Aaron Schrab
At 13:05 +0100 11 Apr 2013, Adam Spiers wrote: The above use case suggests that empty STDIN is actually a reasonable scenario (e.g. when the caller doesn't know in advance whether any queries need to be fed to the background process until after it's already started), so we make the minor behavio

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Jeff King
On Thu, Apr 11, 2013 at 09:31:41PM +0100, Adam Spiers wrote: > The shell source is strong with this one ;-) > > Congrats - I first tried with FIFOs (hence my other patch which moves > the PIPE test prerequisite definition into the core framework - the > original intention was to reuse it here) bu

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 03:11:32PM -0400, Jeff King wrote: > I always get a little nervous with sleeps in the test suite, as they are > indicative that we are trying to avoid some race condition, which means > that the test can fail when the system is under load, or when a tool > like valgrind is u

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Jeff King
On Thu, Apr 11, 2013 at 01:05:12PM +0100, Adam Spiers wrote: > +test_expect_success 'setup: have stdbuf?' ' > + if which stdbuf >/dev/null 2>&1 > + then > + test_set_prereq STDBUF > + fi > +' > + > +test_expect_success STDBUF 'streaming support for --stdin' ' > + ( > +