[parted-devel] [PATCH 13/14] Ignore xfs based test when mkfs.xfs is not present
Joel Granados
jgranado at redhat.com
Tue Jun 9 09:16:02 UTC 2009
On Tue, Jun 09, 2009 at 10:29:52AM +0200, Jim Meyering wrote:
> Joel Granados wrote:
>
> > 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.
>
> No. it's in test-lib.sh, as mentioned above ;-)
oops yep, missed that.
>
> > 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.
>
> I've done that for coreutils (and it was useful there) so certainly
> intend to do the same for parted.
Great!!!
>
> > 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".
>
> That's what is done already, on next.
> If a test requires XFS support, it calls this function early:
>
> require_xfs_
ack
>
> > 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.
>
> t2000 can disappear completely once we officially deprecate
> the file-system-*creation* functionality of parted.
True. but still we might have stuff that create 10M files with dd.
>
> However, I prefer to keep such tests and to make it so they are
> not run by default. In coreutils, I mark such tests with either this
>
> very_expensive_
>
> or this:
>
> expensive_
>
> So they're run by "make check" only if you set RUN_VERY_EXPENSIVE_TESTS=yes
> or RUN_EXPENSIVE_TESTS=yes in your environment.
Very good idea!!
--
Joel Andres Granados
Brno, Czech Republic, Red Hat.
More information about the parted-devel
mailing list