Cherry-picked the relevant common bits from commit 70d41e17164b
in Josef Bacik's fstests tree (https://github.com/josefbacik/fstests).
Quoting from Josef's commit message:
This patch adds the supporting code for using the dm-log-writes
target. The dmlogwrites code is similar to the dmflakey code, it just
gives us functions to build and tear down a dm-log-writes target. We
add a new LOGWRITES_DEV variable to take in the device we will use as
the log and add checks for that.
[Amir:]
- Removed unneeded _test_falloc_support
- Moved _require_log_writes to dmlogwrites
- Document _require_log_writes
- Address review comments by Eryu Guan
Cc: Josef Bacik <jbacik@fb.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
xfstests is no longer supported on IRIX, so remove the IRIX-specific
instructions for building and running xfstests.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
The -udf parameter for check does not exist. UDF can still be tested
via the configuration parameter FSTYP=udf.
Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
The OpenSSL dependency was added for one program, fssum, and it needs
it only because it needs a md5 implementation. Use Solar Designer's
openssl compatible implementation of md5 so we no longer need to
depend on OpenSSL.
Since the OpenSSL libraries are not always available, we had to add
extra complexity to test to see whether fssum exists.
The other problem with depending on the OpenSSL libraries is that
shared library compatibility situation is terrible; a fssum binary
built on a system using libssl1.0.0 is *NOT* run on a system with
libssl1.0.2, since the shared libraries are incompatible even across a
minor version bump. (Sigh.)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Instead of setting the vars TEST/SCRATCH_DEV to overlay base dirs,
allow setting them to block devices to configure the base fs partition,
where overlay dirs will be created.
For example, the following config file can be used to run tests on
xfs test/scratch partitions:
TEST_DEV=/dev/sda5
TEST_DIR=/mnt/test
SCRATCH_DEV=/dev/sda6
SCRATCH_MNT=/mnt/scratch
FSTYP=xfs
Using the same config file, but executing './check -overlay' will
use the same partitions as base fs for overlayfs directories
and set TEST_DIR/SCRATCH_MNT values to overlay mount points, i.e.:
/mnt/test/ovl-mnt and /mnt/scratch/ovl-mnt.
The base fs should be pre-formatted and mounted when starting the test.
An upcoming change is going to support mount/umount of base fs.
The new vars OVL_BASE_SCRATCH_MNT/TEST_DIR are set to point at the
overlayfs base dirs in either legacy or new config method.
Tests should always use these vars and not the legacy SCRATCH/TEST_DEV
vars when referring to overlay base dir.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This is a simple script to compare failures across runs.
Given files containing stdout from several runs, each of which contains
a Failures: line, it will print a table of all failures for each run.
Test subdir names are abbreviated for compactness, i.e. generic->g.
For 7 results files named test 1 through test 7:
Failures:
g/075 g/082 g/209 g/233 g/270 g/388 x/004 x/073 x/076
-----------------------------------------------------
g/082 g/233 x/004 x/073 test1
g/082 g/233 x/004 x/073 x/076 test2
g/082 x/004 x/073 x/076 test3
g/082 g/388 x/004 x/073 test4
g/082 g/270 x/004 x/073 test5
g/082 x/004 x/073 test6
g/075 g/082 g/209 g/233 x/004 x/073 test7
This lets us easily spot unique failures and outliers.
This could be enhanced to output CSV etc, but for now I think it's
helpful to visualize changes in failures across multiple runs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2 things: Make the dependency lines cut-and-paste-able with
line continuations, and fix up the Fedora deps a bit
(remove "awk" - should be "gawk" - and add a couple other
missing dependencies)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Teach _check_xfs_filesystem to scrub mounted filesystems before
unmounting and fscking them. This is mostly to test the online scrub
tool...
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Document all build and runtime requirements for xfstests
on Fedora/RHEL/CentOS boxes, as was done earlier for Ubuntu.
Minor other README edits as well.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Run xfs_repair twice more at the end of each test -- once to rebuild
the btree indices, and again with -n to check the rebuild work.
This is in addition to the regular dry-run spot check.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
A recent test uses the uuidgen utility to generate UUID-based
filenames, but this package is not necessarily installed as part of
the core packages of every distro.
As such, add the UUIDGEN_PROG environment variable to the common
configuration and update the test to require the existence of
uuidgen to run.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
The check script requires that it be run as root, so adding
individualized checks for this in each teat is not needed.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
To build xfstests from minimal Ubuntu, it's necessary to install
some more packages in addition to ones mentioned in README.
Plus, libtool is not needed to specify here since libtool-bin
depends on it.
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
There's a known bug of xfsprogs, when a user or group name beinning
with digits, xfs_quota can't create 'limit' for it.
Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
To allow test names to be more descriptive, allow a suffix to be
added to the numeric name of the test. e.g. a test can be named
"tests/generic/001-some-descriptive-name".
Name suffixes are limited to alphanumeric characters and dash - the
name is always prefixed with an unique id for easy identification
of a specific test. Hence we can still use shorthand forms such as
"generic/001" when referring to a test and be clearly understood.
Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Add sample list of packages (dependencies) required to build XFSTESTS
and add a step to the instructions to mention creating the test
user needed for some of the ACL tests.
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Pass -cifs argument from the command line to enable cifs testing
for $TEST_DEV. Also mention CIFS and missed UDF in README.
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Reviewed-by: Steve French <smfrench@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Just like FSSTRESS_AVOID, FSX_AVOID can be used to add
options at the end of the default fsx runs in each test.
i.e. FSX_AVOID="-H -z -C" will disable punch hole, zero range,
and collapse range calls in all tests which run fsx.
This should handle Ted's concerns about buggy ext4 fallocate
code without needing to add tunables to the kernel to reject
these operations during xfstests runs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
The initial value of FSTYP is unconditionally set to 'xfs' and the
filesystem type is taken from the TEST_DEV. This could lead to confusion
if the device hasn't been formatted yet, eg. an empty image in VM, or
a different test setup took place before.
Now one can specify the desired FSTYP in advance and be safe. If unset,
the fallback to TEST_DEV type continues to work.
Signed-off-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Cleanup 'remake' related matters from the README file as the
remake utility has already been removed by:
commit 609d17c4eb
xfstests: remove remake script
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
commit cbcc88fb changed test selection to use shell globs, so fixup the
examples given in the README file.
remove options for FSTYP other than NFS since the FSTYP will be automatically
detected (on Linux) from $TEST_DEV.
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
After the re-factor, common.* have been renamed to common/* but there
are several files still look for the old path, fix it.
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>