Darrick J. Wong [Thu, 14 Jan 2016 04:33:22 +0000 (20:33 -0800)]
xfs: test fragmentation characteristics of copy-on-write
Perform copy-on-writes at random offsets to stress the CoW allocation
system. Assess the effectiveness of the extent size hint at
combatting fragmentation via unshare, a rewrite, and no-op after the
random writes.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Wed, 13 Jan 2016 19:56:18 +0000 (11:56 -0800)]
xfs: more reflink tests
Create a couple of XFS-specific tests -- one to check that growing
and shrinking the refcount btree works and a second one to check
what happens when we hit maximum refcount.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Thu, 4 Feb 2016 17:26:03 +0000 (09:26 -0800)]
reflink: ensure that we can handle reflinking a lot of extents
Update the existing stress tests to ensure that we can handle
reflinking the same block a million times, and that we can handle
reflinking million different extents. Add a couple of tests to ensure
that we can ^C and SIGKILL our way out of long-running reflinks.
v2: Don't run the signal tests on NFS, as we cannot interrupt NFS
clone operations.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
[hch@lst.de: don't run on NFS] Signed-off-by: Christoph Hellwig <hch@lst.de>
Darrick J. Wong [Wed, 6 Jan 2016 00:03:30 +0000 (16:03 -0800)]
reflink: test CoW behavior with IO errors
Test various scenarios (with dm-flakey) where we simulate write
failures during CoW, to see if the FS can get through it without
blowing up or corrupting data. Plumb in a FS-generic method to
sort out repairing filesystems after they get hit by IO errors.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Tue, 5 Jan 2016 18:06:37 +0000 (10:06 -0800)]
reflink: test intersecting CoW and falloc/fpunch/fzero/fcollapse/finsert/ftrunc
Ensure that we correctly handle a CoW operation immediately followed
by a truncate, falloc, fpunch, fzero, fcollapse, and finsert operation
in the middle of the CoW'd region before any flush can occur.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Wed, 10 Feb 2016 08:33:10 +0000 (00:33 -0800)]
reflink: fix style problems in existing tests
Fix style problems such as unnecessary use of quotes, add helper
variables to reduce visual clutter, and other minor fixes to make the
first batch of tests more closely resemble the second round tests.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Tue, 9 Feb 2016 21:59:13 +0000 (13:59 -0800)]
common: provide a method to repair the scratch fs
Create a wrapper function that repairs any damage to the scratch
filesystem and returns a standard result. We will use this to clean
up after IO error testing and other weird corruption tests.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Tue, 12 Jan 2016 02:04:49 +0000 (18:04 -0800)]
common/dmerror: add some more dmerror routines
Add functions to the dmerror routine so that we can load both the
error table and the linear table. This will help us with EIO testing
of copy-on-write.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Wed, 3 Feb 2016 21:14:01 +0000 (13:14 -0800)]
xfstests: make _scratch_mkfs_blocksized usable
The default mkfs.xfs options contain -b size=4096, so all tests
using _scratch_mkfs_blocksized won't actually run unless those
options are changed. As we're trying to specificly test 1k
blocks we should always override the default option.
v2: Move the function to common/rc
Signed-off-by: Christoph Hellwig <hch@lst.de>
[darrick.wong@oracle.com: move function to common/rc] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Wed, 3 Feb 2016 20:59:48 +0000 (12:59 -0800)]
xfstests: filter whitespace in 128 and 132
Seems either I have a different lsattr version, or different mount points
cause differences in the golden output. Send the lsattr output through
the whitespaces filter so that it works everywhere.
The lsattr output /does/ change depending on mountpoints. Ick. I'd
actually changed it to the long format output because line length in
the short format changes every time the flags change.
Signed-off-by: Christoph Hellwig <hch@lst.de>
[darrick.wong@oracle.com: update changelog] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Thu, 28 Jan 2016 19:26:13 +0000 (11:26 -0800)]
generic/182: this is a dedupe test, check for dedupe
Since this test examines dedupe behavior, the documentation should
say 'dedupe', not 'reflink'. Furthermore, the feature checks must
look for working dedupe functionality, not reflink functionality.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
[hch@lst.de: add the test for dedupe support] Signed-off-by: Christoph Hellwig <hch@lst.de>
Satoru Takeuchi [Sun, 7 Feb 2016 22:27:15 +0000 (09:27 +1100)]
Fix prerequisite packages to build fstests on Ubuntu
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>
Satoru Takeuchi [Sun, 7 Feb 2016 22:27:15 +0000 (09:27 +1100)]
aio-dio-eof-race should be ignored by git
src/aio-dio-regress/aio-dio-eof-race is a binary file built by make.
So it should not be tracked by git.
===============================================================================
$ make clean
...
$ git status
On branch sat-bugfixes
nothing to commit, working directory clean
$ make
...
$ git status
On branch sat-bugfixes
Untracked files:
(use "git add <file>..." to include in what will be committed)
Filipe Manana [Sun, 7 Feb 2016 22:27:15 +0000 (09:27 +1100)]
fstests: btrfs, test for send with clone operations
Test that an incremental send operation which issues clone operations
works for files that have a full path containing more than one parent
directory component.
This used to fail before the following patch for the linux kernel:
"[PATCH] Btrfs: send, fix extent buffer tree lock assertion failure"
Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
NFS uses 32K blocks and thus the numbers used for sanity checking
various reflink operations are way off. Change to relative margings
and increase them a bit to make NFS happy.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Sun, 7 Feb 2016 22:27:15 +0000 (09:27 +1100)]
tests: use lowercase variables for all the new reflink tests
Since $TESTDIR is a local variable, make it lowercase to avoid
confusion with $TEST_DIR. While we're at it, make all the local
variables lowercase.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Sun, 7 Feb 2016 22:27:15 +0000 (09:27 +1100)]
dedupe: record dedupe errors in golden output
The xfs_io dedupe command originally didn't print dedupe errors
to stderr like you'd expect. Since that was fixed, the golden
output should be changed to reflect that.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Sun, 7 Feb 2016 22:27:15 +0000 (09:27 +1100)]
xfs/122: update against xfsprogs 4.3
Make the xfsprogs sb layout and structure size checker work with
modern xfsprogs (i.e. 4.3+ and all the new v5 stuff). The old test
wasn't picking up structures because they're no longer defined in the
"typedef struct xfs_foo { } xfs_foo_t;" style.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Sun, 7 Feb 2016 22:27:15 +0000 (09:27 +1100)]
reflink: fix off-by-one errors when iterating file blocks in a loop
When we're iterating file blocks in a loop (via seq), we have to
end at $nr-1, not $nr.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Sun, 7 Feb 2016 22:27:14 +0000 (09:27 +1100)]
tools/mvtest: call out to the correct group sort program
mvtest should call the actual name of the sort-group program.
Fix a cut-paste error in finding the destination group file.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Eric Sandeen [Sun, 7 Feb 2016 22:27:14 +0000 (09:27 +1100)]
quota: test Q_GETNEXTQUOTA
The new Q_GETNEXTQUOTA quotactl (not yet merged) is designed
to take an ID as input ala Q_GETQUOTA, and return the quota
for the next active ID >= the input ID. This lets us quickly
iterate over all existing quotas by leveraging the kernel's
knowledge of which quotas are allocated and active.
The test contains a new helper binary, test-nextquota, which
tests both the "vfs" and "xfs" versions of the quotactl.
It accepts an ID, and outputs the returned ID, ihard, and
isoft values for that quota. It doesn't return block information
simply because that can vary depending on fs, block size, etc,
and we want something very consistent as output, for verifiation.
The test harness sets quotas for 100 random IDs, remounts,
and uses these quotactls to iterate over all the IDs we set,
using the test binary, making sure we get back what we expect.
Not the prettiest thing, but it works!
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Eryu Guan [Sun, 7 Feb 2016 22:27:14 +0000 (09:27 +1100)]
common: add overlayfs isupport in _scratch_cleanup_files()
All files in lower/upper dirs should be removed for overlayfs in
_scratch_cleanup_files(), not only files in merged dir, otherwise files
from lower dir won't be removed.
Signed-off-by: Eryu Guan <eguan@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Sun, 7 Feb 2016 22:27:14 +0000 (09:27 +1100)]
btrfs: fix test failures after commit 27d077ec0bda
Commit 27d077ec0bda (common: use mount/umount helpers everywhere) made
a few btrfs tests fail (btrfs/003 and btrfs/011). These tests create
filesystems with multiple devices and test the device replace feature,
which need to unmount using the mount path ($SCRATCH_MNT) because
unmounting using one of the devices as an argument ($SCRATCH_DEV) does
not always work - after replace operations we get in /proc/mounts a
device other than $SCRATCH_DEV associated with the mount point
$SCRATCH_MNT (this is mentioned in a comment at btrfs/011 for example),
so we need to pass that other device to the umount program or pass it the
mount point.
Fix this by making _sctatch_unmount() pass $SCRATCH_MNT to umount instead
of $SCRATCH_DEV (when the filesystem being tested is btrfs).
Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Eryu Guan [Sun, 7 Feb 2016 22:27:14 +0000 (09:27 +1100)]
common: no need to parse config file in new
I saw "new" failed the TEST_DEV/SCRATCH_DEV validation when TEST_DEV or
SCRATCH_DEV points to directory, which is needed in overlayfs testing.
"new" only generates test template and doesn't need common/config to
parse and validate TEST_DEV/SCRATCH_DEV etc., so just returns after
setting all needed commands.
Signed-off-by: Eryu Guan <eguan@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Eryu Guan [Sun, 7 Feb 2016 22:27:14 +0000 (09:27 +1100)]
generic/23[23]: some cleanups
1. remove $seqres.full before test
2. no need to check return values of _fsstress and _check_quota_usage
calls, the golden image could catch the failures.
3. remove unused FSX related variables
Signed-off-by: Eryu Guan <eguan@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Jia He [Sun, 7 Feb 2016 22:27:14 +0000 (09:27 +1100)]
common: add names device mounted errors
This adds user friendly prompts to output the already mounted point
from _mount. xfstests will do the cleanup (ie. umount) and user can
not get the mount name information when directory is already
mounted.
Signed-off-by: Jia He <hejianet@gmail.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Dave Chinner [Sun, 7 Feb 2016 22:27:10 +0000 (09:27 +1100)]
fsync-tester: reopen files with correct flags
When "drop caches" tests are run, the test_fd is closed and
re-opened. It is reopened O_RDWR, so dropping O_DIRECT and any other
open flag that was set for test_fd. This fixes a random generic/311
failure due to file data corruption I've been seeing on subtests 11
and 13 when direct IO was specified.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Dave Chinner [Sun, 7 Feb 2016 22:27:06 +0000 (09:27 +1100)]
check: add exclude sections CLI parameter
When we have a config file with multiple sections, we might want to
exclude certain config sections from running. Rather than specifying
all the section we want to run, add a "-S <section>" option to build
up a list of sections to exclude.
This is useful if a given section config is known to cause a fatal
failure,but you still want to run all the other config sections.
Also add support to the setup program that emits the currently
configured setup for each section in the config file.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Dave Chinner [Tue, 2 Feb 2016 04:54:43 +0000 (15:54 +1100)]
xfs: support realtime/log device setup changes in config sections
Currently changing the devices used by "USE_EXTERNAL" environmental
variable is not supported by the config section parsing. Add the
functionality so that we can use config sections to test external
device configs successfully.
This required tracking down a bug in _check_xfs_filesystem() which
was causing a log device to be passed to a test device without an
external log device. This was caused by an uninitialised variable in
the function. I also added full output file removals to the first
couple of generic tests that were failing, because that's where the
check failure output ends up in this case.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Mon, 11 Jan 2016 04:12:20 +0000 (15:12 +1100)]
fstests: btrfs, verify fitrim does not discard reserved device area
Verify that when a fitrim operation is made against a btrfs filesystem,
the ranges [0, 64Kb[ and [68Kb, 1Mb[ of the device are not discarded,
they remain with the content they had before the fitrim operation. These
regions of the device are reserved for a boot loader to use at its will.
In the 4.3 linux kernel we got a regression that allowed a fitrim
operation to discard these reserved ranges of the device, resulting in
the filesystem becoming unbootable after a fitrim. The issue is fixed
by the following patch (targeted for 4.5 and 4.3/4.4 stable releases):
"Btrfs: fix fitrim discarding device area reserved for boot loader's use"
Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Brian Foster [Mon, 11 Jan 2016 04:11:20 +0000 (15:11 +1100)]
xfs: test XFS torn log write detection
XFS torn log write detection includes a mechanism to inject CRC errors
into log records at runtime and shutdown the fs accordingly. This
ensures that the CRC verification pass on the subsequent mount discovers
an invalid record near the head of the log and considers it a torn
write.
This test runs a workload with error injection enabled and verifies that
the subsequent mount is successful. The test repeats for several
iterations using a random frequency factor for the error event each
time.
Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Mon, 11 Jan 2016 04:07:20 +0000 (15:07 +1100)]
fstests: fix cleanup of test btrfs/003
If the test fails after removing a device and before adding it back, it
attempts to add back the device in its _cleanup() function. However this
is broken because the device identifier is stored in a variable local to
the function _test_replace() and not in a global variable. So make the
variable global instead of local.
Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Mon, 11 Jan 2016 04:06:20 +0000 (15:06 +1100)]
fstests: cleanup test btrfs/031
The test was using $SCRATCH_MNT as a mountpoint for $SCRATCH_DEV, which
is counter intuitive and not expected by the fstests framework - this
made the test fail after commit 27d077ec0bda (common: use mount/umount
helpers everywhere). So rewrite the test to use the scratch device for
all data and use a test specific directory inside $TEST_DIR to use as a
mount point for a cross mount of $SCRATCH_DEV.
Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Mon, 11 Jan 2016 04:05:20 +0000 (15:05 +1100)]
fstests: cleanup test btrfs/029
The test was using $SCRATCH_MNT as a mountpoint for $SCRATCH_DEV, which
is counter intuitive and not expected by the fstests framework - this
made the test fail after commit 27d077ec0bda (common: use mount/umount
helpers everywhere). So rewrite the test to use the scratch device for
all data and use a test specific directory inside $TEST_DIR to use as a
mount point for a cross mount of $SCRATCH_DEV.
This test was also overriding $seqres.full, through the redirect ">"
operator, if a call to cp failed. Fix that by using instead the operator
">>". Also make the test use the function _mount() instead of calling
the mount program directly.
Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Here, each operation is on a separate line. When the first word is
"skip", the operation will be skipped. The next parameters are offset,
length, and the current file size, followed by optional flags like
keep_size and clode_open. A trailing asterisk indicates that the
operation overlaps with the operation that has failed.
Add a --replay-ops option that allows to replay the operations recorded
in such a $name.fsxops file. (The log can be modified to easily narrow
down which operations are causing the failure.)
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Add FL_SKIPPED, FL_CLOSE_OPEN, and FL_KEEP_SIZE flags to the log
entries. Use FL_SKIPPED to indicate that an operation was skipped. Use
FL_CLOSE_OPEN to encode when an operation is followed by a close/open
cycle. Use FL_KEEP_SIZE to indicate when the OP_ZERO_RANGE and
OP_FALLOCATE operations should keep the file size unchanged and put the
current file size into args[2] so that we can tell which operation was
actually called from the log.
After that, arg2 of log4 is always either unused or the current file size, so
remove it and unconditionally remember the current file size.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Generate all test parameters in test(), including keep_size.
The code is slightly more complicated than it could be to produce the
same sequence of operations for the same random seed.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Report the number of successful operations at the end of an fsx run.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Some hex numbers are prefixed with "0x" and right-aligned with spaces,
leading to output like "0x beef". Make that "0x0beef" instead.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Move the run_fsx shell function into common/rc. Fix it to avoid
duplicate output on errors. Write the actual fsx parameters used into
$seqres.full instead of the BSIZE and PSIZE placeholders.
Include the symbolic fallocate mode in fsx error messages instead of the
numeric value. Use fprintf(stderr, ...) instead of warn() when
including strerror(errno) doesn't make sense.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 21 Dec 2015 07:40:16 +0000 (18:40 +1100)]
generic: create a dedupe group
Create a group for just the deduplication tests.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 21 Dec 2015 07:13:37 +0000 (18:13 +1100)]
reflink: more tests
Add more tests for unaligned copy-on-write things, and explicitly
test the ability to pass "len == 0" to mean reflink/dedupe all
the way to the end of the file".
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 21 Dec 2015 07:08:15 +0000 (18:08 +1100)]
xfs/129: require loop
Missed a _require_loop for xfs/129.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 21 Dec 2015 07:08:12 +0000 (18:08 +1100)]
xfs/128: allow larger margin for disk space usage
The free blocks count can vary from our calculations by up to 8% on a
1k-block filesystem, so permit that.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 21 Dec 2015 07:08:01 +0000 (18:08 +1100)]
generic/15[78]: fix error messages in the golden output
Fix the error messages in the golden output for generic/15[78], which
examine the responses to invalid inputs as returned by the
clone/clone_range/extent_same ioctls. Also fix a filtering omission.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 21 Dec 2015 07:07:57 +0000 (18:07 +1100)]
tests: don't leave cruft behind on the TEST_MNT
Don't leave cruft behind on the test device's filesystem, so as to
avoid filling it with debris.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Mon, 21 Dec 2015 07:07:52 +0000 (18:07 +1100)]
test-scripts: test migration scripts
Add two scripts: "nextid" finds the next available test ID number in a
group, and "mvtest" relocates a test, fixes the golden output, and
moves the group entry for that test.
v2: sorting group files should preserve group order; nextid should use
the same algorithm as new; move both tools to tools/.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Eryu Guan [Mon, 21 Dec 2015 07:07:47 +0000 (18:07 +1100)]
overlayfs: rudimentary test support
Adding basic overlayfs support to fstests, it doesn't test anything
overlayfs specific, but runs existing tests on top of overlayfs. It's
following the path from Eric's patchset and Zab's review back in Mar.
A new fstype "overlay" is added, and TEST_DEV/SCRATCH_DEV are required
to be fs paths, and overlayfs is mounted at TEST_DIR/SCRATCH_MNT, so
tests can be run there.
To test overlayfs, setup config as something like the following
Eric Sandeen [Mon, 21 Dec 2015 07:07:43 +0000 (18:07 +1100)]
common: use mount/umount helpers everywhere
Replace every explicit mount/umount of scratch or test devices with
helper functions. This allows the next patch to add in hooks to these
functions in order to set up & tear down overlayfs on every mount/umount
(also adds _test_unmount(), which didn't exist prior)
[Eryu Guan rebased the patch agains latest master and replaced more
mount/umount with helpers]
Signed-off-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eric Sandeen <esandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Xiaoguang Wang [Mon, 21 Dec 2015 07:01:54 +0000 (18:01 +1100)]
generic/275: add to the 'enospc' group
Currently we're developing a new in-band deduplication feature for btrfs,
when enabing this feature, it will take much long time to hit the enospc
condition which 275 tries to create. I think 275 is also certain enospc
test and we should add it to 'enospc' group, then we can skip it easily by
excluding 'enospc' group when running fstests.
Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Eric Sandeen [Mon, 21 Dec 2015 07:01:47 +0000 (18:01 +1100)]
xfs/293: tighten up checks for documented xfs_io commands
Some commands (like "zero") are simple words which commonly
occur in the manpage text even if they aren't documented as
commands.
Grep for " $COMMAND" instead of the bare word, because
the documented commands show up as indented.
This reveals that the "zero" command is not documented yet.
(It catches "help" too, because it's documented differently;
I'll fix that up in the manpage when I add "zero").
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Jeff Moyer [Mon, 21 Dec 2015 07:01:47 +0000 (18:01 +1100)]
dmflakey: don't run for dax mounts
There is no sense running dmflakey tests with the dax mount option,
since dmflakey doesn't support it. Mark these as _notrun so that it is
clear that this type of testing is not happenning for dax.
Suggested-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Jeff Moyer [Mon, 21 Dec 2015 07:01:47 +0000 (18:01 +1100)]
generic/042: remove from the 'auto' group
This test fails 100% of the time for me on xfs and current git head, and
is not run for ext4 since ext4 does not support shutdown. After talking
with bfoster, it isn't expected to succeed right now. Since the auto
group is for tests that *are* expected to succeed, let's move this one
out.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Eric Sandeen [Mon, 21 Dec 2015 07:01:47 +0000 (18:01 +1100)]
defrag: loosen input file requirements
We don't have perfect control of file allocation for these tests;
in some cases we may fail to adequately fragment a file prior to
defragmentation testing, and today that will fail the test.
Attack this on 2 fronts:
1) Explicitly allow fewer extents on one of the input files in
generic/018 where the allocator has discretion.
2) _notrun rather than _fail if we don't create enough extents;
this is a defrag test, not an allocator/fragmentation test,
so just skip the test if we can't create an acceptable file
for defrag testing.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Acked-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Dave Chinner <david@fromorbit.com>
Chandan Rajendra [Mon, 21 Dec 2015 07:01:47 +0000 (18:01 +1100)]
btrfs/106: work on non-4k page sized machines
This commit makes use of the new _filter_xfs_io_pages_modified filtering
function to print information in terms of page size units rather than file
offset.
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Chandan Rajendra [Mon, 21 Dec 2015 07:01:46 +0000 (18:01 +1100)]
btrfs/103: work on non-4k block sized filesystems
This commit makes use of the new _filter_xfs_io_blocks_modified filtering
function to print information in terms of file blocks rather than file
offset.
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Chandan Rajendra [Mon, 21 Dec 2015 07:01:46 +0000 (18:01 +1100)]
btrfs/098: work on non-4k block sized filesystems
This commit makes use of the new _filter_xfs_io_blocks_modified filtering
function to print information in terms of file blocks rather than file
offset.
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Chandan Rajendra [Mon, 21 Dec 2015 07:01:46 +0000 (18:01 +1100)]
btrfs/097: work on non-4k block sized filesystems
This commit makes use of the new _filter_xfs_io_blocks_modified filtering
function to print information in terms of file blocks rather than file
offset.
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Chandan Rajendra [Mon, 21 Dec 2015 07:01:46 +0000 (18:01 +1100)]
btrfs/095: work on non-4k block sized filesystems
This commit makes use of the new _filter_xfs_io_blocks_modified filtering
function to print information in terms of file blocks rather than file
offset.
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Chandan Rajendra [Mon, 21 Dec 2015 07:01:46 +0000 (18:01 +1100)]
btrfs/094: work on non-4k block sized filesystems
This commit makes use of the new _filter_xfs_io_blocks_modified filtering
function to print information in terms of file blocks rather than file
offset.
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>