This patch does the nuts and bolts of grabbing fio results and
storing them in a database in order to check against for future
runs. This works by storing the results in resuts/fio-results.db as
a sqlite database. The src/perf directory has all the supporting
python code for parsing the fio json results, storing it in the
database, and loading previous results from the database to compare
with the current results.
This also adds a PERF_CONFIGNAME option that must be set for this to
work. Since we all have various ways we run fstests it doesn't make
sense to compare different configurations with each other (unless
specifically desired). The PERF_CONFIGNAME will allow us to
separate out results for different test run configurations to make
sure we're comparing results correctly.
Currently we only check against the last perf result. In the future
I will flesh this out to compare against the average of N number of
runs to be a little more complete, and hopefully that will allow us
to also watch latencies as well.
[eguan: add required Makefile updates]
Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
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>
Imported Josef Bacik's code from:
https://github.com/josefbacik/log-writes.git
Specialized program for replaying a write log that was recorded by
device mapper log-writes target. The tools is used to perform
crash consistency tests, allowing to run an arbitrary check tool
(fsck) at specified checkpoints in the write log.
[Amir:]
- Add project Makefile and SOURCE files
- Document the replay-log auxiliary program
- 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>
I'm working on a set of kernel patches to change how writeback errors
are handled and reported in the kernel. Instead of reporting a
writeback error to only the first fsync caller on the file, it has
the the kernel report them once on every file description that was
open at the time of the error.
This patch adds a test for this new behavior. Basically, open many fds
to the same file, turn on dm_error, write to each of the fds, and then
fsync them all to ensure that they all get an error back.
To do that, I'm adding a new tools/dmerror script that the C program
can use to load the error table from the script. It's also suitable for
setting up, frobbing and tearing down a dmerror device for by-hand testing.
For now, only ext2/3/4 and xfs are whitelisted on this test, since those
filesystems are included in the initial patchset. We can add to that as
we convert filesystems, and eventually make it a more general test.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
More usage options for testing open_by_handle, which are needed
for testing stable handles across copy up in overlayfs.
usage: open_by_handle [-c|-l|-u|-d] <test_dir> [num_files]
Examples:
1. Create test set of N files and try to get their NFS handles:
open_by_handle -c <test_dir> [N]
This is used by new helper _require_exportfs() to check
if filesystem supports exportfs
2. Get file handles for existing test set, drop caches and try to
open all files by handle:
open_by_handle <test_dir> [N]
3. Get file handles for existing test set, unlink all test files,
drop caches, try to open all files by handle and expect ESTALE:
open_by_handle -d <test_dir> [N]
4. Get file handles for existing test set, hardlink all test files,
then unlink the original files, drop caches and try to open all
files by handle (should work):
open_by_handle -l <test_dir> [N]
open_by_handle -u <test_dir> [N]
This test is done with 2 invocations of the program, first to
hardlink (-l) and then to unlink the originals (-u), because
we would like to be able to perform the hardlinks on overlay
lower layer and unlink on upper layer.
NOTE that open_by_handle -u doesn't check if the files are
hardlinked, it just assumes that they are. If they are not
then the test will fail, because file handles would be stale.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Check the stx_attributes that can be set by calling chattr.
The script probes the filesystem with chattr to find out which of
+a, +c, +d and +i are supported before testing combinations of
attrs. Note that if a filesystem supports chattr with these, but
doesn't paste the flag values into stx_attributes, the test will
fail as there's no way to distinguish cleared from unset.
Certain chattr flags are reflected in specific stx_attributes flags:
chattr flag stx_attributes flag
+a STATX_ATTR_APPEND
+c STATX_ATTR_COMPRESSED
+d STATX_ATTR_NODUMP
+i STATX_ATTR_IMMUTABLE
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Partially expand the documentation available in xfstests to include
requirements checking and auxiliary programs for testing.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Update the version and changelog for xfstests-1.1.1 release.
Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Nathan Scott <nathans@debian.org>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Add the release script used in the other XFS user space packages.
The version is set to 1.1.0, to differentiate it from the 1.0.0
version that was recorded in the VERSION file.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>