Darrick J. Wong [Wed, 23 Mar 2016 06:39:09 +0000 (17:39 +1100)]
xfs: test per-ag allocation accounting during truncate-caused refcountbt expansion
Ensure that refcountbt allocations during truncate operations come
from the per-AG reservation and are not charged to the transaction.
Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Wed, 23 Mar 2016 06:37:32 +0000 (17:37 +1100)]
xfs/122: define _GNU_SOURCE when compiling test program
This makes it so we don't get warnings about off64_t not being
defined when compiling the test program.
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 [Wed, 23 Mar 2016 06:37:32 +0000 (17:37 +1100)]
xfs/030: fix output on newer filesystems
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 [Wed, 23 Mar 2016 06:37:31 +0000 (17:37 +1100)]
reflink: fix fragmentation tests to work on >4k block size filesystems
For tests that only overwrite part of a file, only consider the number
of extents in the *rewritten* blocks when deciding if the FS
fragmentation performance is satisfactory.
(Also slip in a fix for xfs/127 so that it formats correctly when we
specify big blocksizes via MKFS_OPTIONS.)
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
David Sterba [Wed, 23 Mar 2016 03:35:14 +0000 (14:35 +1100)]
filter.btrfs: new filter for property messages
The error message in newer btrfs utilities contains name of the
property, we want to filter it out so it matches golden output. There's
an optional parameter with property name that is matched against the
command output.
Signed-off-by: David Sterba <dsterba@suse.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Ross Zwisler [Wed, 23 Mar 2016 03:33:40 +0000 (14:33 +1100)]
ext4: defrag not supported with DAX
As of this kernel commit:
commit 73f34a5e2ced ("ext4: online defrag not supported with DAX")
online defrag operations for ext4 are disallowed when the filesystem is
mounted with the DAX option.
This causes several xfstests to fail because they expect the defrag
operation to change the file layout:
ext4/308 [failed, exit status 1] - output mismatch (see /root/xfstests/results//ext4/308.out.bad)
--- tests/ext4/308.out 2015-10-02 10:19:36.791795792 -0600
+++ /root/xfstests/results//ext4/308.out.bad 2016-02-17 16:20:52.330454602 -0700
@@ -23,659 +23,5 @@ 50f924a5dc9b03609a4577f9f961414b SCRATCH_MNT/test.10
Perform compacting 50f924a5dc9b03609a4577f9f961414b SCRATCH_MNT/test.10
-Perform compacting, second pass
-50f924a5dc9b03609a4577f9f961414b SCRATCH_MNT/test.10
-Create file with 20 * 2 fragments
-wrote 1234/1234 bytes at offset 0
...
(Run 'diff -u tests/ext4/308.out /root/xfstests/results//ext4/308.out.bad' to see the entire diff)
generic/018 1s ... [failed, exit status 1] - output mismatch (see /root/xfstests/results//generic/018.out.bad)
--- tests/generic/018.out 2016-02-17 16:02:40.103656140 -0700
+++ /root/xfstests/results//generic/018.out.bad 2016-02-17 16:20:53.117459173 -0700
@@ -10,10 +10,6 @@
After: 1
Write backwards sync, but contiguous - should defrag to 1 extent
Before: in_range(5, 10)
-After: 1
-Write backwards sync leaving holes - defrag should do nothing
-Before: 16
-After: 16
...
(Run 'diff -u tests/generic/018.out /root/xfstests/results//generic/018.out.bad' to see the entire diff)
Avoid this by skipping over defrag tests if we are using ext4 + DAX.
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Eryu Guan [Wed, 23 Mar 2016 03:32:51 +0000 (14:32 +1100)]
common: filter more messages from _scratch_mkfs_ext4
Commit a94334afa2ff ("common: filter warning messages from mkfs.ext4")
filtered warning messages from mke2fs stderr output but missed the
mke2fs version infomation message, and generic/135 still fails because
of this
QA output created by 135
+mke2fs 1.42.9 (28-Dec-2013) 0000000 1212 1212 1212 1212 1212 1212 1212 1212
So also filter out this message in _scratch_mkfs_ext4.
Reported-by: Xiao Yang <yangx.jy@cn.fujitsu.com> 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, 28 Feb 2016 23:19:05 +0000 (10:19 +1100)]
fstests: update autoconf rules to define _GNU_SOURCE where needed
Starting from xfsprogs commit cb898f157f84 ("linux.h: Use off64_t
instead of loff_t") in v4.5-rc1, fstests failed to build because of
configure error:
checking xfs/xfs.h usability... no
checking xfs/xfs.h presence... yes
configure: WARNING: xfs/xfs.h: present but cannot be compiled
configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
configure: WARNING: xfs/xfs.h: see the Autoconf documentation
configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
checking for xfs/xfs.h... no
FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
Run "make install-qa" from the xfsprogs source.
and that's because off64_t is not defined without _GNU_SOURCE being set.
Fix it by updating the autoconf rules adding _GNU_SOURCE define for the
following checks:
Theodore Ts'o [Sun, 28 Feb 2016 23:18:32 +0000 (10:18 +1100)]
common: filter warning messages from mkfs.ext4
Commit 4a5cda8102828 ("xfstests: do not unmount tmpfs during remount")
changed generic/135 to no longer redirect stderr to /dev/null when
running _scratch_mkfs. This caused ext4 using a 1k block size to fail
when running this test because mkfs.ext4 would issue a warning message
about the use of a non-block size that wasn't expected by golden
output for the test. Fix this by filtering out warning messages in
_scratch_mkfs_ext4.
Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Theodore Ts'o [Sun, 28 Feb 2016 23:18:17 +0000 (10:18 +1100)]
defrag: require extents support for ext4 defrag
The e4defrag program requires the use of fallocate, which in turn
means that the file system must have extents. Enforce this
requirement so we don't get test failure noise when testing ext4's
ext3 compatibility.
Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Theodore Ts'o [Sun, 28 Feb 2016 23:17:56 +0000 (10:17 +1100)]
generic/125: add _require_odirect
Also remove generic/125 from the auto group, and add it to the new
pnfs group. This is to document where this test might be useful; it's
not really going to be useful for most normal on-disk file systems, so
remove it from the auto group.
Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Anand Jain [Sun, 21 Feb 2016 21:37:14 +0000 (08:37 +1100)]
btrfs/011: use replace_options
This patch fixes test btrfs/011 which intended to use -r option
but was never used since its associated args 'replace_options'
didn't make it to the cli.
Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Fri, 19 Feb 2016 01:15:33 +0000 (12:15 +1100)]
generic: test file fsync after rename operation
Test that if we have a file F1 with two links, one in a directory A and
the other in directory B, if we remove the link in directory B, move some
other file F2 from directory B into directory C, fsync inode F1, power
fail and remount the filesystem, file F2 exists and is located only in
directory C.
This is motivated by a bug found in btrfs, which is fixed by the patch
(for the linux kernel) titled:
"Btrfs: fix file loss on log replay after renaming a file and fsync"
Tested against ext3, ext4, xfs, f2fs and reiserfs.
Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Fri, 19 Feb 2016 01:15:17 +0000 (12:15 +1100)]
generic: test directory fsync after rename operation
Test that if we move one file between directories, fsync the parent
directory of the old directory, power fail and remount the filesystem,
the file is not lost and it's located at the destination directory.
This is motivated by a bug found in btrfs, which is fixed by the patch
(for the linux kernel) titled:
"Btrfs: fix file loss on log replay after renaming a file and fsync"
Tested against ext3, ext4, xfs, f2fs and reiserfs.
Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Thu, 18 Feb 2016 23:51:25 +0000 (10:51 +1100)]
xfs/24[356]: check for -c switch to xfs_io bmap command
Extend _require_xfs_io_command so that we can pass it a command line
argument to look for, and then use new capabililty in the relevant
tests to ensure that bmap knows how to dump CoW fork contents (bmap -c)
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Thu, 18 Feb 2016 23:50:32 +0000 (10:50 +1100)]
btrfs: test directory fsync after deleting snapshots
Test that if we fsync a directory that had a snapshot entry in it that
was deleted and crash, the next time we mount the filesystem, the log
replay procedure will not fail and the snapshot is not present anymore.
This issue is fixed by the following patch for the linux kernel:
"Btrfs: fix unreplayable log after snapshot delete + parent dir fsync"
Signed-off-by: Filipe Manana <fdmanana@suse.com> Tested-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Zorro Lang [Thu, 18 Feb 2016 23:49:54 +0000 (10:49 +1100)]
xfs: new test default user/group quota
When default quota is set, all different quota types inherits the
same default value, include group quota. So if a user quota limit
larger than the default user quota value, it will still be limited
by the group default quota value.
An upstream patch for this bug:
xfs: Split default quota limits by quota type
Signed-off-by: Zorro Lang <zlang@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Hugh Dickins [Thu, 18 Feb 2016 23:47:55 +0000 (10:47 +1100)]
generic/079,277: require chattr, not xattrs
Add a new helper, _require_chattr, which allows the test to explicitly
check to see if the file system supports a specific chattr flag, as
not all file systems support chattr +A or chattr +i, and the presence
of extended attribute support is has nothing to do with a specific
chattr flag being supported.
Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Hugh Dickins [Thu, 18 Feb 2016 23:46:27 +0000 (10:46 +1100)]
generic/009: require fiemap
Require xfs_io commands fiemap and falloc as well as fzero: fzero
without falloc is unlikely, but tmpfs may later support fzero, though
probably never fiemap (and in v3.15 wrongly claimed to support fzero).
Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Junho Ryu [Thu, 18 Feb 2016 23:45:55 +0000 (10:45 +1100)]
generic/053: do not unmount before calling _check_scratch_fs()
Fix generic/053 so it works on tmpfs by relying on _check_scratch_fs
to unmount before checking the file system and remounting it
afterwards. Many other tests rely on this, and since tmpfs does not
have a file system consistency checker, this allows the test to
succeed because the files don't disappear when the tmpfs file system
is unmounted.
Signed-off-by: Junho Ryu <jayr@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Junho Ryu [Thu, 18 Feb 2016 23:45:35 +0000 (10:45 +1100)]
xfstests: do not unmount tmpfs during remount
Several tests unmount then re-mount the scratch filesystem, to check
that the content is unchanged; but unmounting a tmpfs is designed to
lose its content, which causes such tests to fail unnecessarily.
Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Junho Ryu <jayr@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Theodore Ts'o [Thu, 18 Feb 2016 23:45:04 +0000 (10:45 +1100)]
Rename _test_mount to _test_cycle_mount
This makes it clear when we are using "mount ; umount" versus "mount
-o remount" for most file systems. The reason for this distinction is
(a) tests may want to test the difference between what happens on the
remount versus the munt paths, (b) with tmpfs, "mount ; umount" will
cause the contents of all of the files to disappear which makes many
tests sad, and (c) some mount options may not be changed using "mount
-o remount".
Currently _test_mount performs "_test_mount ; _test_umount"
so mechnically rename this function to _test_cycle_mount. This was
done mechnically using the script fragment:
Theodore Ts'o [Thu, 18 Feb 2016 23:44:53 +0000 (10:44 +1100)]
Rename _scratch_mount to _scratch_cycle_mount
This makes it clear when we are using "mount ; umount" versus "mount
-o remount" for most file systems. The reason for this distinction is
(a) tests may want to test the difference between what happens on the
remount versus the munt paths, (b) with tmpfs, "mount ; umount" will
cause the contents of all of the files to disappear which makes many
tests sad, and (c) some mount options may not be changed using "mount
-o remount".
Currently _scratch_mount performs "_scratch_mount ; _scratch_umount"
so mechnically rename this function to _scratch_cycle_mount. This was
done mechnically using the script fragment:
Hugh Dickins [Thu, 18 Feb 2016 23:44:25 +0000 (10:44 +1100)]
generic: use mount point instead of device name
A tmpfs mount does not involve any block device, its $SCRATCH_DEV is
nothing but a place-holder, so apply 'df' or 'stat' to its mount point
$SCRATCH_MNT instead of to $SCRATCH_DEV.
Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Junho Ryu <jayr@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Theodore Ts'o [Thu, 18 Feb 2016 23:43:42 +0000 (10:43 +1100)]
check: avoid spurious complaints that tests/$FSTYP/group does not exist
There are no tmpfs specific tests, so tests/tmpfs does not exist.
This commit avoids printing a spurious error message when running
specifying a group of tests (e.g., "check -g quick"):
DEVICE: test:/tmp
MK2FS OPTIONS:
MOUNT OPTIONS: -o block_validity
./check: line 96: tests/tmpfs/group: No such file or directory
FSTYP -- tmpfs
PLATFORM -- Linux/i686 kvm-xfstests 4.5.0-rc2ext4-00002-g6df2762
MKFS_OPTIONS -- test:/scratch
MOUNT_OPTIONS -- -o size=1G test:/scratch /test/scratch
generic/001 [10:31:10][ 5.811742] run fstests generic/001
...
Similar problems have been reported when testing nfs using xfstests.
Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Theodore Ts'o [Thu, 18 Feb 2016 23:43:34 +0000 (10:43 +1100)]
ext4/001: add output variant for nodelalloc mounts
If the delayed allocation is disabled, we need a slightly different
output for the delayed allocation portion of the tests.
Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Filipe Manana [Thu, 18 Feb 2016 23:43:04 +0000 (10:43 +1100)]
generic/158: test dedupe with destination offset past EOF
We were testing when the source file offset starts at EOF or beyond,
but not when the destination offset is beyond EOF or when the
destination offset is smaller than EOF but destination offset plus
dedup length is greater than EOF.
This is motivated by a bug in btrfs' extent_same (dedup) ioctl where
we allowed the destination offset to start at EOF and beyond (and
destination offset + length beyond EOF) for the case where the source
and destination files are the same (was not allowed for different
files used as source and destination). This also made the file's
metadata inconsistent when the dedup operation succeeded, which
happened when the source range corresponded to a file hole, prealloc
extent or a data extent filled with zeroes.
The btrfs issue is fixed by the following patch for the linux kernel:
Signed-off-by: Filipe Manana <fdmanana@suse.com>
[darrick.wong@oracle.com: fix merge conflicts with latest reflink patchbomb] 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>
Eryu Guan [Thu, 18 Feb 2016 23:42:40 +0000 (10:42 +1100)]
ext4: test partial blocksize defrag integrity issue
Calling EXT4_IOC_MOVE_EXTENT on file not aligned with block size and
block size is smaller than page size would cause integrity issue on the
partial-blocksize part when copying data between orign file and donor
file.
This ext4 kernel patch would fix it, titled
"ext4: don't read blocks from disk after extents being swapped in
move_extent_per_page())"
Though this bug only happens in the blocksize smaller than pagesize
case, there's no harm to test on various block size fs, so no block size
is specified in the test, it depends on the test configurations.
Signed-off-by: Eryu Guan <eguan@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Zorro Lang [Thu, 18 Feb 2016 23:41:49 +0000 (10:41 +1100)]
xfs: change return value check to golden image check
xfs/133 and xfs/138 use too much code to do "return value" check,
it's not necessary. For the code can be more readable and clear,
I change "return value" check to golden image check.
Signed-off-by: Zorro Lang <zlang@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Eryu Guan [Thu, 18 Feb 2016 23:40:56 +0000 (10:40 +1100)]
generic/072: limit max cpu number to 8
Right now generic/072 scales the loop count based on the cpu count. But
on hosts with many cpus(100+), generic/072 runs for hours and generates
very high system load.
Given that the original bug can be reproduced easily on unpatched
kernel, the great number of loops and long run time are not needed. So
limiting the cpu number to 8 (which gives around 20 seconds run time on
my test vm with 8 vcpus) seems reasonable.
Signed-off-by: Eryu Guan <eguan@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong [Wed, 10 Feb 2016 07:09:15 +0000 (23:09 -0800)]
xfs: ensure that we don't crash when freeing the ag reservations on a ro mount
Christoph Hellwig discovered that the kernel crashed trying to free
the refcount btree per-ag reservation on a ro mount (because we don't
create the reservation except for rw mounts and ro->rw remounts). So,
test this to make sure we never do that again. :)
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Darrick J. Wong [Fri, 5 Feb 2016 04:01:41 +0000 (20:01 -0800)]
reflink: test reflink+cow+enospc all at the same time
Set up an impossibly small filesystem and try to reflink and rewrite a
file on it to see what happens when we ENOSPC. Basically
generic/16[67] but with a constrained fs size.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
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>