I tested it with etx4 and ext3 and ext2.
The only change I really made was to force the fsck (-f) and instead of
doing a "yes|fsck_cmd", I'm passing the '-y' flag thereby forcing the yes to
any question.

We needed to set the -f flag since there were scenarios wherein the
filesystem had a corrupted inode table (eg: using dbugfs) and since the
"check_filesystem" flag wasn't set, the fsck wouldn't run.

But if you can think of any other file system I should run this against,
I'll ensure that I check it.


---
Cheers!
Akshay Lal


On Fri, Apr 2, 2010 at 3:48 PM, Martin Bligh <[email protected]> wrote:

> did you test this on a bunch of different fs types? If I recall,
> the syntax for fsck is slightly different for all of them, which
> is why it was done this way.
>
> On Fri, Apr 2, 2010 at 2:52 PM, Akshay Lal <[email protected]> wrote:
> > base_partitions:
> > Changed the flags for fsck (-n to -fy) to force the fsck and
> > force the unmount and correction of any errors.
> > Changed the fsck command from yes|cmd to just cmd since we are
> > now providing the -y option.
> >
> >
> > Signed-off-by: Akshay Lal <[email protected]>
> >
> > --- autotest/client/bin/base_partition.py       2010-04-02
> 13:09:00.000000000 -0700
> > +++ autotest/client/bin/base_partition.py       2010-04-02
> 13:09:00.000000000 -0700
> > @@ -612,7 +612,7 @@
> >                         self.fstype)
> >
> >
> > -    def fsck(self, args='-n', record=True):
> > +    def fsck(self, args='-fy', record=True):
> >         """
> >         Run filesystem check
> >
> > @@ -620,7 +620,6 @@
> >                 which works on most tools.
> >         """
> >
> > -
> >         # I hate reiserfstools.
> >         # Requires an explit Yes for some inane reason
> >         fsck_cmd = '%s %s %s' % (self.get_fsck_exec(), self.device, args)
> > @@ -628,7 +627,7 @@
> >             fsck_cmd = 'yes "Yes" | ' + fsck_cmd
> >         sys.stdout.flush()
> >         try:
> > -            utils.system("yes | " + fsck_cmd)
> > +            utils.system_output(fsck_cmd)
> >         except:
> >             if record:
> >                 self.job.record('FAIL', None, fsck_cmd,
> error.format_error())
> > _______________________________________________
> > 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