monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Bug/patch: automate stdio


From: Timothy Brownawell
Subject: Re: [Monotone-devel] Bug/patch: automate stdio
Date: Tue, 28 Nov 2006 15:12:13 -0600

On Tue, 2006-11-28 at 10:27 -0800, Nathaniel Smith wrote:
> On Tue, Nov 28, 2006 at 12:05:02PM -0600, Timothy Brownawell wrote:
> > On Sat, 2006-11-25 at 20:40 +0100, Christian Ohler wrote:
> > > There's a pretty serious bug in automate stdio in mtn 0.31 and mainline. 
> > >   Under certain circumstances, mtn gets confused reading its input and 
> > > processes a command that is different from what was sent on stdin.
> > > 
> > > I believe the attached (one-line) patch fixes this.  Unfortunately, I 
> > > see no easy way for me to provide a test case for this.
> > 
> > Patch applied, thanks. And yeah, it'd be a bit of a pain to write a test
> > for.
> 
> I suppose we'd have to write some sort of mock iostream, that fed us
> bytes with random blocksizes?  I think I've seen this done (in the
> twisted testsuite), but ugh...

(echo -n "l6:le"; sleep 2; echo -n "avese") | mtn automate stdio

The "bit of a pain" mostly comes from needing to implement spawn_pipe
for Windows (since the patch posted a few days ago only does unix), and
then figure out the right way to make it available in tester. Once
that's done, actually writing a test should be pretty simple (see above
shell example).

-- 
Timothy

Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]