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

> On Wed, Apr 28, 2010 at 1:55 PM, Michael Rubin <[email protected]> wrote:
> > On Thu, Apr 22, 2010 at 11:54 AM, Akshay Lal <[email protected]>
> wrote:
> >> Well previously, when the fsck ran on an unmounted file system and the
> file
> >> system was dirty/corrupted in anyway, the fsck would throw an error (but
> fix
> >> the file system '-fy'). This error would get logged in the
> >> console/tests-specific log as an 'ERROR', but the overall test would
> pass.
> >> Thats not really very non-intuitive and not correct (either) since you
> >> ideally want the file system in a clean state after all the tests run.
> >> Explicitly stating that a failure in an fsck run results in a test
> failure
> >> seems like the right approach - I think.
> >
> > Is there any disagreement on this issue?
> >
> > To me it seems obvious that after testing any file system errors are
> > flagged as failures. When would that not be the case?
>
> I'm still stuck on whether we should be raising TestError outside of
> a test, and why the groups code doesn't seem to be working as
> intended. Any thrown error should turn into a TestError inside a
> test, AFAICS
>

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.

-- John

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

Reply via email to