The test covers several areas including enabling projid32bit
functionality dynamically by xfs_admin, dumping, restoring, quota
reporting and xfs_db projid values reporting.
This test case hits a bug with xfsdump/xfsrestore process on a
projid32bit enabled filesystem.
Eric Sandeen: change {16,32}less filenames to {16,32}bit, add quick group
Signed-off-by: Boris Ranto <ranto.boris@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
This is a significant rework of 275, which made too many
assumptions about details of space usage and failed on several
filesystems (it passed on xfs, but only by accident).
This new version tries to leave about 256k free, then tries
a single 1M IO, and fails only if 0 bytes are written.
It also sends a lot more to $seq.full for debugging on failure,
doesn't rm -rf $SCRATC_MNT, and fixes a few other stylistic things.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
The xfstests autotools currently searches locally in
../{acl,attr,dmapi,xfsprogs}
for libraries that xfstests depends upon, in addition to searching for them in
their regular installed locations on a system, e.g. /usr/lib. It appears this
feature was added (but not documented) so that xfs developers can build and run
xfstests without having to install the libraries. This can lead to trouble if
you expect that xfstests is using the versions of the libraries installed on
the system.
If a local library was found and not installed, libtool will create a wrapper
script to call the binary from the .libs directory. This patch will remove
searching for local libraries so that the installed libraries are always used.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myer <bpm@sgi.com>
This patch replaces the INSTALL macro with LTINSTALL so that libtool is used
to install the applications. Libtool will install the binary from the proper
location and display a warning if any shared library dependancies are not
properly installed. This ensures that a libtool wrapper shell script is not
installed in place of application when libtool wrappers are being used.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myer <bpm@sgi.com>
Test 227 (fsr test) creates fragmented fre space by doing lots of
small writes to sparse offsets ni a file. This seeks the disk heads
around a lot writing data. We don't need to write data - just
trigger allocation. Hence use preallocation instead of data writes
and run at allocation speed rather than data write speed.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Remount won't run a quota check - it's only done during mount. Hence
all quota tests using this check function are not actually
validating XFS filesystems right now.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Unmounting a fileystem mounted on a loop device doesn't always tear
down the loop device. Its racy, and it causes tests to randomly
fail.
To avoid that, we have to use umount -d to ensure that we destroy
loop devices under filesystems in case the kernel doesn't tear it
down automatically to prevent the test from failing. However, if
the kernel does tear it down automatically, umount now issues a
warning that it couldn't tear down the loop device because it
couldn't find it, and that causes the test to fail. *facepalm*
So, convert all the loop device unmounts to use -d, and direct the
output of all of them to /dev/null.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
It runs a bunch of rm processes in the background, then immediately
calls _check_scratch_fs without waiting for them to complete, hence
the unmount can fail with a busy filesystem error.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
stat -f $TEST_DEV shows block size of the fs where $TEST_DEV
resides, usually it is the root fs. This will fail 020 on non-4096 block
size ext2/3/4, also 4096 block size ext2/3/4 on ppc64.
Instead, stat -f $TEST_DIR will show block size of the fs to be tested.
Tested and passed on ext2/3/4, xfs, btrfs with all supported block size.
Cc: Eric Sandeen <esandeen@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
The latest version of xfsdump/restore (3.1.0) causes dump tests
to complain. Fix up the filter to include a wider selection of
version numbers.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
The test 016 fills scratch device with some data and then creates xfs fs
on the scratch device. Later, the test assumes that the previously
written data are still written there and checks for them at specific
locations. On ssd drive this will lead to a failure since the blocks are
discarded by default when the mkfs command is run.
This is a more verbose version of the previous patch.
This simple patch that adds -K to stop the discarding (if the mkfs
command supports it) fixed the issue for me:
Signed-off-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Given that we now drop invalid unlinked inode lists there is no message
to capture. Also add a sed expression to avoid failures on old repair
versions.
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Test 273 fails for me due to lack of inodes (ext? filesystem is not configured
to have enough inodes for being filled up by 4k files). So change the test
to create larger files so that we don't hit this limit.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
This changes quite a few things about 274 to make it more robust
and useful.
* More comments
* Use xfs_io for falloc (not all systems have /usr/bin/fallocate)
* use _require_xfs_io_falloc to be sure system & fs support preallocation
* Do not remove all of the files in $SCRATCH_MNT/ post-mkfs
* Do not remove all of the files in $SCRATCH_MNT/ on completion
(this breaks e2fsck when lost+found/ goes missing)
* Don't cd into $SCRATCH_MNT
* Try harder to completely fill the fs
* Use a larger preallocated space, and write into all of it (hopefully
avoid just accidentally succeeding by writing into fs reserved
space that may be there)
* Save more output in $seq.full instead of /dev/null
* Fill preallocated space diabolically
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Jan Kara <jack@suse.cz>
There were two reasons why test 273 was failing. Firstrly, when running on
ext4 fs it was removing everything from SCRATCH_MNT directory at the beginning
of tests including the lost+found directory. This caused error while checking
scratch fs after finishing test. Secondly, obtaining of the partition size was
not counting with with behaviour of df utility which may split the line containg
informations about one partition when it is too long thus it may have returned
nothing.
First problem was solved with removing all unnecessary rm -rf commands and the
second one was fixed with alternative awk script which is able to deal with
any line splitting possible. Also 'umount $SCRATCH_DEV' was substituted for
'_scratch_unmount'.
Cc: sandeen@sandeen.net
Signed-off-by: Tom Marek <tmarek@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
There was no mention of 'make install' step in the README file.
Run make install added to section 'Building Linux'.
Signed-off-by: Tom Marek <tmarek@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Add three tests for verifying compatibility with xfsdump format 2.
Test 281 generates a format 2 dump and restores it.
Test 282 does a restore of a level 0 dump in the old dump format
followed by a restore of a level 1 dump in the current dump format.
Test 283 does a restore of a level 0 dump in the current dump format
followed by a restore of a level 1 dump in the old dump format.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
When offset + length is overflow of xfs_io builtin pread and pwrite in linux,
the error message should be "Invalid argument".
In 32_bit, offset + length should cause pread and pwrite to error, So the
out should be OK.
The patch fix as following:
- "pwrite64: Invalid argument" will be replaced with "pwrite64: File too large"
- "pread64: Invalid argument" will be replaced with "read 0/xxx bytes at offset <OFFSET>"
- delete _filter_xfs_io
- add auto group
- add 071.out.32
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
020 can be made generic by limiting the total attribute space
used in the tests as appropriate. Unless we know we have a
large-xattr-capable fs, limit total space to a bit under one
fs block.
Now passes for me on ext3, ext4, btrfs, as well as xfs.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Add 2 new test groups:
freeze: tests which test filesystem freeze
dangerous: tests which may hang or oops
The 2nd may be useful for automated testing to do i.e.
./check -g auto -x dangerous
./check -g auto,dangerous
to try to get fuller coverage before running into tests
which may panic or hang the box and stop the test cycle.
I doubt I have all the potential dangerous tests, but
they can be added later when found.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>