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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Several tests assume a certain amount of disk space free after the
reserve block pool is filled. Changing the default size of the
reserve block pool breaks these tests because there is less space
available that first thought.
Change these tests to specify a known reserve block pool size of
1024 blocks to ensure that they continue to work correctly even if
the default size changes.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Preliminary fiemap testing support based on a test util written by
Josef Bacik.
For now it's only run with preallocation disabled, because xfs has a
tendency to fill in holes with data blocks (EOF prealloc stuff I
think) and similar for explicit preallocation, so this is breaking
the preallocation tests for now, when it finds a "data" block where
it expects a preallocated block.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
When making a specifically sized scratch filesystem, we need to
calculate the size rather than assigning the caclculation expression
to a variable and passing that into the _scratch_mkfs_sized
function. Currently sized filesystems are failing to be made and the
code is falling back to full sized filesystems so we are not testing
enospc issues correctly.
Signed-off-by: Dave Chinner <david@fromorbit.com>
When we deplete the reserve block pool or receive an error during
delayed allocation, we currently toss the page away. If that page
has delayed allocation extents on it, we can fail to remove them and
leave stale delayed llocation extents lying around on the inode.
This can, in certain circumstances, trigger errors later on when the
stale delalloc extent it found again, including tripping a BUG().
Exercise this failure path so that we get code coverage of the fix
that prevents stale delalloc mappings from being left on the inode
when pages are tossed.
This is based on a test case supplied by Lachlan McIlroy.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Recent fixes to 073 added umount -d, but if we happen
to be using a scratch device on loopback, subsequent
tests get very, very unhappy when their loopback block
device goes away!
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
When selinux is on, we get tons of new xattrs, which messes
up all kinds of output.
The simplest way out of this, for now, seems to be to just mount
with a global context instead and skip writing the extra xattrs.
I've been using this internally on Fedora and RHEL for a while now.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Running on a newly-provisioned box:
077 - output mismatch (see 077.out.bad)
--- 077.out 2010-02-17 11:22:35.275052872 -0500
+++ 077.out.bad 2010-02-17 11:59:48.979053106 -0500
@@ -1,6 +1,7 @@
QA output created by 077
*** create filesystem
*** set default ACL
+setfacl: Option -m: Invalid argument near character 3
*** populate filesystem, pass #1
*** populate filesystem, pass #2
*** all done
because we didn't have the fsgqa user, and tried:
# setfacl -R -dm u:fsgqa:rwx,g::rwx,o::r-x,m::rwx ...
instead should have had:
077 [not run] fsgqa user not defined.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
blkid without options usually gets no probe results at all just after
creating a filesystem. This problem is due to the cache that blkid
uses in it's default mode, and is unlikely to get fixed. Use the -p
option to bypass the cache layer.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
There's one brace too many here - this was pointed out in the review
but slipped back into the commited patch.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
The filter I added for removing duplicate users from the
output of repquota didn't do the job very well. This
fixes that, making it so the first time a user is seen
its line is printed, not thereafter.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
204 can be generic.
Also remove a stray _scratch_mkfs that snuck into
_scratch_mkfs_sized :/
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>