On Fri, May 15, 2009 at 2:24 AM, Eric Sandeen <sandeen@xxxxxxxxxxx> wrote:
> Theodore Ts'o wrote:
> > 2) Why is the TESTDIR have to be a persistent xfs volume? I noticed
> > that when testing UDF and NFS, the scratch volume is used (and $testdir
> > is set to the point at the scratch directory). Is there some
> > fundamental reason why there must be an XFS volume mounted, even if the
> > fundamental intention is to test some other filesystem type, whether
> > it's UDF, NFS, or Ext4?
> Hm I'll have to dig, not certain. I thought that TESTDIR would usually
> be used for non-destructive testing, general IO etc, while SCRATCHDIR
> would usually be used for any test that required lots of repeatability,
> and could therefore be more fs-specific. But that's handwaving.
Yeah, I'm not sure if there is a reason to have testdir as a
persistent xfs volume -
in particular I'm not sure on any constraints existing in the tests.
However, the initial TESTDIR intention was to do tests over an ageing filesystem
and one where obviously we didn't need to mkfs over it etc. It exists
and is checked
beforehand and it exists and is checked afterwards.
When doing UDF/IRIX testing we copied over a bunch of xfstests that were general
enough to use on UDF for us. From distant memory, I don't think we
really cared for
a distinction between scratchdir and testdir, and just wanted one
volume to be necessary
for testing (and hence why the main interest for udf was in scratchdir).
Later, someone else ported back the udf tests into the xfstests in an
effort to make
things more filesystem independent.
> > I understand the primary purpose of
> > xfstests has to be to support XFS development, but looking at the
> > scripts, there is a *huge* amount of XFS-specific assumptions all over
> > the shell scripts. As a result I'm still of two minds whether it will
> > be less work to start from scratch to develop a test suite for ext4 (and
> > from the beginning try to make it filesystem independent) or to try to
> > hack xfstests and try to make it more filesystem indpendent.
> Yep, agreed. I think it's worth evaluating whether the xfstests harness
> is within reach of the goal, though. But you may be right about how
> much work it is to get there.
> Really the value to other filesystems is in the tests (those which are
> or could be made generic), more than the harness, I'd say.
>From memory, the general filesystem handling for mkfs'ing, mounting, checking
and other stuff (in the common file scripts) was a bit messy and error prone.
I think extracting out the useful/fs-generic tests might be more valuable too.
It would be nice to see a clear distinction between filesystem specific tests
and generic ones.