[parted-devel] [PATCH 13/14] Ignore xfs based test when mkfs.xfs is not present

Joel Granados jgranado at redhat.com
Tue Jun 9 08:21:37 UTC 2009


On Fri, Jun 05, 2009 at 03:58:20PM +0200, Jim Meyering wrote:
> Joel Granados Moreno wrote:
> > When the mkfs.xfs command was not present the test failed because it
> > could not create an xfs file system.  This resulted in a false negative.
> >
> > * lvm-utils.sh (fs_xfs_exists_) : New function.
> > * t4100-msdos-partition-limits.sh : Ignore the whole test when mkfs.xfs
> >   is not present.
> 
> This is already fixed on next:
> There, I added this function to test-lib.sh:
> 
> require_xfs_()
> {
>   ( mkfs.xfs -V ) >/dev/null 2>&1 ||
>     {
>       say "skipping $0: this test requires XFS support"
>       test_done
>       exit
>     }
> }
> 
> So if you're inclined, you can see about cherry-picking
> the required part(s).  If not, let me know and I'll do it.

IMO, this can wait for when next is merged.  If its there, it means it
will be in parted eventually.  I have not seen the way it is
implemented, but by what I see in this mail I assume its a function in
t4100-msdos-partition-limits.sh.  What do you think about putting all
the "common" functions.  Like this one (require_xfs_) in a common test
lib file.  It can be the same lvm-utils.sh but with a different name?
This is what I have done for my mdadm test additions.  If you are ok
with it I can start work on it on the next branch....

I would also like to bring up three feature that I would like to add to
the parted test suite :
1. For the skipped tests to state that they were skipped instead of
   saying PASSED.
2. For the tests that should be skipped because some command is missing,
   the message and the code for skipping should not be in the tests
   themselves but in some "common" library that centrally checks for the
   presence of a command.  The only thing that should be present in the
   test files is a variable definition.  Something like
   "require_xfs_support=1".
3. Reduce, considerable the t2000 test.  It takes for ever.  Don't know
   the specifics, but I bet we can cut some execution time here and
   there.

Regards.

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.



More information about the parted-devel mailing list