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>
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>
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>
The function _need_to_be_root does not exists anymore as of commit
56ff01f471 ("xfstests: remove _need_to_be_root").
A v2 of the patch that added test btrfs/118 without calling this
function was sent but not picked [1], instead v1 was picked.
So fix this now.
[1] https://patchwork.kernel.org/patch/8354831/
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This test is only valid for CRC enabled XFS, and test fails with
MKFS_OPTIONS="-m crc=0" being set (no mount failure detected).
Fix it by adding _require_scratch_xfs_crc, which ensures scratch device
has CRC support and enabled.
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
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>
Commit a94334afa2 ("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>
Add a max acl count into common/attr for f2fs in order to make
f2fs passing generic/026 test case.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
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:
xfs.h libxfs.h xfs_log_format.h xlog_assign_lsn xqm.h xfsctl
Suggested-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Test that the filesystem's implementation of the listxattrs system call
lists all the xattrs an inode has.
This test is motivated by a bug found in btrfs, which is fixed by the
following patch for the linux kernel:
"Btrfs: fix listxattrs not listing all xattrs packed in the same item"
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Commit 4a5cda8102 ("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>
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>
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>
We don't need to do this test at all, since _scratch_mkfs_sized will
do this check for us. This allows this test to work with tmpfs.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Commit 1dfb50585c (quota: test Q_GETNEXTQUOTA) added a new binary
without updating .gitignore. Fix this.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
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>