On Wed, Apr 28, 2010 at 2:44 PM, Martin Bligh <[email protected]> wrote:

> > No, that's not the way it's generally been done. The idea (in practice)
> was
> > that Test* exceptions indicated something bad happened during a test but
> > that the job could in general continue, while other exceptions meant
> > something more catastrophic happened (e.g. JobError during a test ->
> abort
> > the whole job).
> > So the only thing really special about Test* exceptions compared to other
> > ones is that when they happen during a test they get swallowed by
> > job.run_test instead of killing the job, and they get logged nicely (with
> > the appropriate WARN/FAIL/ERROR status). It's not outright wrong to raise
> > them outside of a test, it's just ugly and you can't expect them to get
> > handled as nicely as when you normally throw them during a test.
>
> Fair enough. I still don't see why the group level code isn't catching
> this. Are you saying that's because it's not a TestError? Or is something
> else broken?
>

Well, the flip side of the Test* exceptions (according to our how to write a
test docs) is that when someone raises them during a test they expect it to
terminate the test; catching them in run_group would violate that
expectation. We document raising TestError as the correct way to say "we're
done here, log the test as an ERROR and move on".

-- John
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to