Commit Graph

1459 Commits

Author SHA1 Message Date
Rich Johnston 871be1d8b5 xfstests: Use installed libraries only
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>
2012-09-06 12:33:57 -05:00
Rich Johnston 81f985dde3 xfstests: Use libtool to install applications
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>
2012-09-06 12:33:38 -05:00
Dave Chinner 1aa6cb71fb xfstests: speed up 227 by using preallocation
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>
2012-08-22 15:51:16 -05:00
Dave Chinner 6955823f92 xfstests: _check_quota_usage needs to unmount to get XFS quotacheck
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>
2012-08-22 15:51:02 -05:00
Dave Chinner 1670bd4f34 xfstests: loop devices vs umount stupidity
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>
2012-08-22 15:50:46 -05:00
Dave Chinner 427249fe4a xfstests: test 110 sometimes fails to unmount scratch dev
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>
2012-08-22 15:49:46 -05:00
Ben Myers 3f8766ce5b Merge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev 2012-08-08 13:42:46 -05:00
Eryu Guan 187e92903f common.attr: get block size of test fs not root fs
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>
2012-07-03 22:11:10 -05:00
Brian Foster 98758371f5 common.dump: filter out latest xfsdump version messages
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>
2012-06-18 11:48:00 -05:00
Boris Ranto b748511b81 016: Do not discard blocks at mkfs time
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>
2012-05-30 17:39:29 -05:00
Mark Tinguely 90f99484dc 030: fix for new xfs_repair versions
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>
2012-05-23 12:21:28 -05:00
Jan Kara d0b73054c2 273: fix failure due to lack of inodes
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>
2012-05-17 16:33:23 -05:00
Eric Sandeen 270a6e5ad5 274: Many fixups
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>
2012-05-15 15:20:05 -05:00
Tom Marek 1fce0780f6 273: fix of reading scratch size and removing lost+found
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>
2012-05-15 10:48:47 -05:00
Tom Marek 3fdaf8c4b0 README: add 'make install' to building steps
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>
2012-05-15 10:48:43 -05:00
Jeff Liu 7d1479581c xfstests: introduce 286 for SEEK_DATA/SEEK_HOLE copy test
Introduce 286 for SEEK_DATA/SEEK_HOLE copy tests.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-05-11 12:33:22 -05:00
Jeff Liu 35d4853d87 xfstests: introduce 285 for SEEK_DATA/SEEK_HOLE sanity test
Introduce 285 for SEEK_DATA/SEEK_HOLE sanity tests.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-05-11 12:15:20 -05:00
Liu Bo e875c9d88f add btrfs online defragment test
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-03-31 20:14:06 +00:00
Bill Kendall 98f4fae38b xfstests: add tests 281-283 for old xfsdump format
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>
2012-03-31 20:14:06 +00:00
Peng Haitao 80f2aaf701 071: make this test work as expected on Linux
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>
2012-03-31 20:14:06 +00:00
Eric Sandeen fff4359d8b 020: make this xattr test generic
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>
2012-03-31 20:14:06 +00:00
Eric Sandeen 3f28d55c39 add freeze and dangerous groups
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>
2012-03-31 20:14:06 +00:00
Lukas Czerner 0966519543 251: make fstrim call a bit more random
To cover cases when fstrim arguments are not block/block group/file
system size aligned, we can be a bit more random. This commit changes
fstrim argument computing to use $RANDOM bash variable in order to have
different minlen, start, len argument settings and change the full fs
fstrim to be called randomly as well.

Also make kill and wait not complain about non existent process, since
it may have already finished before we attempt to kill it and wait for
it. No reason to fail the test.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-03-31 20:14:06 +00:00
Ben Myers 65a708d11f 050: update inode softlimit output
With Mitsuo Hayasaka's kernel patch "xfs: change available ranges of softlimit
and hardlimit in quota check", xfs quota behavior is slightly different.

This needs to be reflected in test 050.  The new behavior is that we only start
the timer when we're above soft inode quota, and we don't start the timer when
we're at or below.

Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-03-31 20:14:06 +00:00
Liu Bo 1aab95f5b2 218: support btrfs
Btrfs progs has a defragment tool, so we can test 218 on btrfs now.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-03-31 20:14:06 +00:00