Commit Graph

1446 Commits

Author SHA1 Message Date
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
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
Liu Bo 929221ba9b 251: fix cp -axT problem
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>
2012-03-31 20:14:06 +00:00
Curt Wohlgemuth a7e35712e8 fsx: fix msync parameters
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>
2012-03-31 20:14:06 +00:00
Eric Sandeen 749f28fdc5 235: do smaller test IO
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>
2012-03-28 22:26:29 -05:00
Eric Sandeen 61e488737b clean up scsi_debug module handling
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>
2012-03-09 11:36:54 -06:00
Eric Sandeen f46664daed 280: test freeze deadlock w/ quotas
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>
2012-03-08 17:33:16 -06:00
Eric Sandeen 74ed5e51da 279: test mkfs with various sector sizes & alignments
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>
2012-03-08 17:29:40 -06:00
Stefan Behrens 4f12ea5a4e before test execution, print test number to syslog
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>
2012-03-08 16:28:31 -06:00
Jeff Moyer b0a1d57ba3 113: add testing for O_DIRECT + O_SYNC
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>
2012-03-02 14:17:07 -06:00
Eric Sandeen 28c0fadd20 256: use more specific grep for file size
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>
2012-02-17 14:43:12 -06:00
Eric Sandeen 61b1a7d68c 068: run fsstress in read/write mode
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>
2012-02-08 12:30:07 -06:00
Eric Sandeen 7d89aa9076 fsstress: make sync a write op
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>
2012-02-06 00:00:52 -06:00
Eryu Guan bc78389b3f 271: use xfs_io to truncate file instead of truncate(1)
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>
2012-01-27 13:15:30 -06:00
Eric Sandeen f73f284b23 278: Ensure lost+found is not created with wrong link count
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>
2012-01-27 13:05:07 -06:00