Commit Graph

1199 Commits

Author SHA1 Message Date
Jan Kara bb1911020f Add quota test with fsstress
Run fsstress and verify that quota accounting is correct after it finishes.

Signed-off-by: Jan Kara <jack@suse.cz>
2010-05-25 22:37:56 +02:00
Jan Kara d3714f7f76 Add test of quota accounting using fsx
Run fsx (and also several fsx threads in parallel) and verify that
quota accounting is correct after they finish.

Signed-off-by: Jan Kara <jack@suse.cz>
2010-05-25 22:37:56 +02:00
Jan Kara a764d7b39f Test basic quota enforcement
Add a test which checks whether basic quota enforcement works.

Signed-off-by: Jan Kara <jack@suse.cz>
2010-05-25 22:37:45 +02:00
Jan Kara 2a7c4917c9 Fix fallocate() test
The test for fallocate was broken because it used $TEST_DIR/$tmp.io. Because
$tmp is usually something like /tmp/1234 or /mnt/1234 the file cannot be
created and xfs_io fails regardless of existance of fallocate support. Moreover
the subsequent message parsing decides that fallocate is actually supported
because it does not expect this message.

Fix the test to not use $tmp.

Signed-off-by: Jan Kara <jack@suse.cz>
2010-05-24 11:46:44 +02:00
Jan Kara c9ff0c0447 Fix test whether kernel supports quotas
For all 2.6 kernels presence of quota support in kernel can be detected by
checking /proc/sys/fs/quota. This is actually more reliable than trying to
mount a filesystem with quota options (for example because SCRATCH_DEV does
not have to contain a filesystem type we are going to test).

Signed-off-by: Jan Kara <jack@suse.cz>
2010-05-20 19:06:15 +02:00
Christoph Hellwig f73e0fb3f2 xfstests: test extent size hints
This is an adapted version of the reproduced in OSS BZ #874, which
shows file corruption when using the extent size hint.

Signed-off-by: Geoffrey Wehrman <gwehrman@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2010-05-10 19:39:04 +02:00
Alex Elder 6728bbddc8 xfstests: honor comments in the test group file
There are some spots in the "group" file where test numbers have
groups listed after a '#' character, clearly intending for those
groups to be commented out.  But the way the group list gets
generated that commenting doesn't work, and in fact these tests
explicitly *are* included in such commented-out groups.

This patch fixes that, stripping out all comments (which start
with a '#' character and end with a newline) from the file before
building the set of test numbers for a group.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-05-07 10:32:13 -05:00
Amit Arora ae98f7a137 xfstests 228: New testcase to check if fallocate respects RLIMIT_FSIZE
Add a new testcase to the xfstests suite to check if fallocate respects
the limit imposed by RLIMIT_FSIZE (can be set by "ulimit -f XXX") or
not, on a particular filesystem.

Signed-off-by: Amit Arora <aarora@in.ibm.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2010-05-05 14:15:08 -05:00
Tao Ma c42a04c273 xfstests: Add query fiemap count test.
According to Documentation/filesystems/fiemap.txt, If fm_extent_count
is zero, then the fm_extents[] array is ignored (no extents will be
returned), and the fm_mapped_extents count will hold the number of
extents needed.

This is broken by commit 97db39a1f6f69e906e98118392400de5217aa33a.
So add this test case in fiemap tester to avoid future regression.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Reviewed-by: Dave Chinner <david@fromorbit.com>
2010-05-04 16:01:00 +10:00
Dave Chinner 3f99d87418 xfsqa: build dbtest on debian platforms
Set up autoconf to find the correct headers and compat libraries for
debian squeeze, and massage the includes to ensure the right headers get
included. Also fix a compile warning that was emitted now that it is being
compiled.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-05-04 16:01:26 +10:00
Dave Chinner 80d1e88a24 xfsqa: keep xfs_fsr output around in test 222
To confirm that xfs_fsr is doing the right thing, make it output debug
and verbose messages and store them in the 222.full file so that it
can be checked after the fact for correct operation.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-05-04 16:01:36 +10:00
Dave Chinner fd5fbc5c38 xfsqa: clean up 030 repair output
With the new checks in xfs_repair, it outputs more information
about errors found than previously. This new output can be ignored
for the purposeѕ of this test, so filter it all out. This will
allow the test to run on new and old reapir binaries.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-05-04 16:01:47 +10:00
Christoph Hellwig 523d94684f xfstests: fix fiemap-tester when build without fallocate
Make sure at least the tests passing -p0 like xfstests 225 can work when
built without fallocate support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2010-05-01 15:12:56 +02:00
Dave Chinner fa6a7868cd xfsqa: more sh to bash conversions
A new test is using /bin/sh and failing on debian. Clean it up and all the
remaining uses of /bin/sh.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-04-29 09:59:24 +10:00
Dave Chinner a8fa6ee439 xfsqa: new fsr defragmentation test
This test aims to recreate the conditions that caused xfs_fsr to
corrupt inode forks. The problem was that the data forks between the
two inodes were in different formats due to different inode fork
offsets, so when they swapped the data forks the formats were
invalid.

This test generates a filesystem with a known fragmented freespace pattern and
then abuses known "behaviours" of the allocator to generate files
with a known number of extents. It creates attributes to generate a
known inode fork offset, then uses a debug feature of xfs_fsr to
attempt to defrag the inode to a known number of extents.

By using these features, we can pretty much cover the entire matrix of inode
fork configurations, hence reproducing the conditions that lead to corruptions.
This test has already uncovered one bug in the current kernel code, and the
current fsr (with it's naive attribute fork handling) is aborted on a couple of
hundred of the files created by this test.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
2010-04-28 15:34:06 +10:00
Eric Sandeen f03e512ff6 xfststests 226: test for prealloc/delalloc/reserved space recapture
Test writing and removing a file in a loop; filesize is 64m,
filesystem size is 256m.  Loop 16 times each for buffered and
direct.

ext4 hits enospc after a couple loops.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Alex Elder <aelder@sgi.com>
2010-04-16 13:20:54 -05:00
Eric Sandeen 1e4ec2a55a xfstests: make sure $seq.full files don't land in /
186 and 192, at least, were landing (part of) their $seq.full
files in /

Fix this by using $here/$seq.full where needed.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-04-16 11:36:22 -05:00
Lukas Czerner 9a496ba1f8 xfstests: 125: run ftrunc with relative path
Since ftrunc is invoked with su $qa_user, it can fail when absolute path
is not accessible to everyone.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2010-04-16 10:50:01 -05:00
Christoph Hellwig b90c485fd0 xfstests: don't use -s option to repquota
The -s option to repquota used to be a no-op, but actually changes
output to different units in quota tools 4.0.  Remove it from the
repquota invocation in test 219.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Tested-by: "Theodore Ts'o" <tytso@mit.edu>
2010-04-05 21:48:52 +02:00
Eric Sandeen 9d9081821d xfstests: exit non-0 if fs check fails
Right now if any of the _check_scratch_fs tests etc fail,
the check script exits but with 0 status.

This change will cause the status to be non-0 so we can detect
the error.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: David Chinner <david@fromorbit.com>
2010-03-31 22:01:11 -05:00
Eric Sandeen b2fd1f3f27 xfstests: use $TEST_DIR in 225
Oops, another hard-coded /mnt/test

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-03-24 11:11:51 -05:00
Eric Sandeen 64f2b6a153 xfstests: drop readlink of test devices
Comments say it's for devfs; it's actually breaking lvm devices, now.
I think we can just drop it.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-03-24 11:12:32 -05:00
Eric Sandeen 5bd1146450 xfstests: filter 203 mount point
Right now this only works if TEST_DIR == /mnt/test

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-03-24 11:14:16 -05:00
Lukas Czerner 833f57c0ad xfstests: avoid blkid cache with -c /dev/null not -p
The addition of "-p" to blkid calls broke xfstests
on older systems where this was not supported.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-03-12 09:26:38 -06:00
Dimitry Monakhov 0dba87f0f7 xfstests: fix log filtering in 223's testcase
Msg filter was missed in one place, so test failed if
$SCRATCH_MNT is different than /mnt/scratch.diff 

Signed-off-by: Dimitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2010-03-09 11:59:46 -06:00