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.


---
Cheers!
Akshay Lal


On Thu, Apr 22, 2010 at 11:27 AM, Martin Bligh <[email protected]> wrote:

> Not sure this is correct ... is it necessarily called in a
> test context?
>
> On Tue, Apr 20, 2010 at 4:47 PM, Akshay Lal <[email protected]> wrote:
> > Explicitly raising error.AutotestError when fsck finds file system
> > inconsistencies. This will force the Autotest run to terminate,
> > resulting a failed test run.
> >
> > Signed-off-by: Akshay Lal <[email protected]>
> >
> > --- autotest/client/bin/base_partition.py       2010-04-20
> 12:31:13.000000000 -0700
> > +++ autotest/client/bin/base_partition.py       2010-04-20
> 12:31:13.000000000 -0700
> > @@ -631,7 +631,8 @@
> >         except:
> >             if record:
> >                 self.job.record('FAIL', None, fsck_cmd,
> error.format_error())
> > -            raise
> > +            raise error.TestError('Fsck found errors with the underlying
> '
> > +                                  'file system')
> >         else:
> >             if record:
> >                 self.job.record('GOOD', None, fsck_cmd)
> > _______________________________________________
> > 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