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>
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>
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>
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>
When I ran xfstests, 251 got failed cause I use a symlink and
"cp -axT" did not work as wish:
cp: cannot overwrite directory `/mnt/scratch/1' with non-directory
With this patch, 251 has passed.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This explicitly sends MS_SYNC as the flag to msync() in
fsx.c, in domapwrite(). Without this flag, the memory
written to the mmap'ed region will not be flushed to disk;
in fact, on Linux, calling msync() with a '0' or MS_ASYNC
flag is a no-op.
Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Test 235 fails on ext2/ext3 with 1024 fs block size because a
16k write uses an extra metadata block. If we do a smaller write
this won't happen.
Reported by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2 little fixes to common scsi_debug handling.
* don't consider the scsi_debug module in use in
_require, unless it can't be rmmod'd
* don't try to rmmod it in _put unless it is currently
loaded
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
This tests the quota+freeze hang scenario described & fixed in
dcdbed85 quota: Fix deadlock with suspend and quotas
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
This test uses the scsi_debug module to test mkfs against
various physical & logical sector sizes, and with aligned
and unaligned devices.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
When the xfstests are executed in a batch (like "check 001-299")
and produce syslog output, it is helpful to know which test was
causing the output. Therefore each time a test is started, a
syslog message is generated that contains the number of the
xfstest.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
This patch adds a couple more aio-stress runs to test 113. The first
simply adds -S, to test out AIO+DIO+O_SYNC. The second adds -S and -o
2, which directs aio-stress to only perform the random write test.
These two tests helped identify several bugs in ext4.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Removing the "-F" flag in xfs_io changed stat output.
Before the change when -F was used, whether or not the file
was on xfs, it skipped the extra FSGEOM call. Now that -F is
removed, it calls FSGEOM if the file is on an xfs fs. The "size"
grep in test 256 was a bit too loose and matched 2 lines if the
FSGEOM output was present, breaking the test.
A more specific grep for stat.size fixes this.
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Jan Kara was testing filesystem freeze, and was consistently locking
up, although my tests of 068 were passing. He pointed out that
he was running in read/write mode, and it was atime updates causing
the trouble. Sure enough, dropping "-w" from fsstress locked me up
too. Change this so we get better (and more realistic) coverage.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
cc: Jan Kara <jack@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
I was running 068 to test freeze changes, and realized that
"sync" is not in the op list when "-w" (write ops) is specified,
although fsync & fdatasync are. It seems to me that sync should
be a default write op as well.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Distros(eg. RHEL5) with older version of coreutils have no truncate(1)
command. Use xfs_io instead to avoid "command not found" failures.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
xfs_repair was leaving lost+found directory with a wrong link count when a
cleaned inode was re-used to create lost+found. This test case confirm that,
after xfs_repair is executed, the lost+found inode is left in a consistent
state.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>