This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make TestBreakpoints deterministic


Hi Andrew,

On Tue, 2006-08-22 at 11:47 -0400, Andrew Cagney wrote:
> > We are talking about different tearDowns it seems.
> > The testcase has its own teardown in which will make sure the eventloop
> > is stopped (and before that it will now make sure the process is gone,
> > that is what the patch added).
> > And there is the TestLib.tearDown() which is called from the testcase
> > teardown, after the eventloop is properly stopped, and which mobs up any
> > other processes that might have been spawned.
> >   
> We're not.
> 
> That code assumes that tearDown is a fair-weather method which it is 
> not.  tearDown must work regardless of the state of the rest of the 
> test.  In particular and especially when the test has crashed for some 
> totally unexplained reason.  Relying on a still running event loop 
> violates that.

I don't see why. We setup the the process and the eventloop in setup, so
we close it down in teardown. Sure if things go completely bonkers thing
fail. But that is what you want from the testsuite to point out things
that break.

> It should be possible to make a simple change to testLib.tearDown that 
> both makes it even more robust and allows you to remove the broken code 
> in your local tearDown method.

You mean that the testLib.tearDown() is broken because it doesn't handle
this case yet, and you want to fix it so it does correctly handles it.
That would be nice because then I don't need similar code in other new
testcases. I'll look into it.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]