Commit Graph

1510 Commits

Author SHA1 Message Date
Ben Myers 5b18e73653 xfstests: Update .gitignore
Root entries to where they only can occur.

Add patches/ and .pc/ for quilt.

Add /src/seek_copy_test and /src/seek_sanity_test.

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2012-10-31 12:13:16 -05:00
Jan Engelhardt c4850b1d17 xfstests: build: use new autoconf constructs
Looks like AC_CONFIG_FILES existed since 2.14 already.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-10-31 12:13:05 -05:00
Eryu Guan d1ffc87746 xfstests 250: remove unwanted new line in 250.out
Additional new line at the end of 250.out will fail the test, remove it.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-29 09:49:46 -05:00
Eric Sandeen 0b2ab695c1 xfstests: test ext4 statfs
Calculating free blocks in ext[234] is surprisingly hard, since
by default we report "bsd" style df which doesn't count filesystem
"overhead" blocks as used.

With a lot of code dedicated to sorting out what to report as
free, things tend to go wrong surprisingly often.

Here's a test to actually try to stop the next regression.  ;)

NB: For bsddf, the kernel currently does not count journal blocks
as overhead; it probably should.  But the test below looks to have
the result within 1% of perfection, so it still passes even if
the kernel doesn't count the journal against free blocks.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-29 08:47:09 -05:00
Eric Sandeen e2e226715b xfstests: more 214 updates
A few more updates for the 214 fallocate test, since
ext4 is having some fallocate trouble these days.

First off, updated 214.out was missing from the previous
commit to this file.

Second, run each test against a new filename and don't
remove it, so that the post-test fs check will have
more work to do.

Third, and a newly-found corruption case for ext4.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 10:39:57 -05:00
Eric Sandeen edd6bcf9c4 xfstests: optionally run all tests under quota
This patch might be a little heavy handed, but it seems to
work; if you set USE_QUOTA=1 in your environment, all
tests should be run with quota on and enabled.

This will hopefully help shake out some of the ext4
quota problems, although one needs to keep an eye
on the console to see whether warnings scroll by.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 10:39:23 -05:00
Eric Sandeen d5ea873fcb xfstests: resolve symlinked devices to real paths
If you try running xfstests on lvm volumes which are symlinks,
it'll fail to run several tests because our _require_scratch 
framework ultimately uses lstat not stat, and does not think 
the lvm device (which is usually a symlink to a dm-X device) 
is a block device.  Sigh.

Last try at this - just resolve any symlinked devicenames
into their realpath(3) in common.config.

This actually seems to work.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 10:38:30 -05:00
Eric Sandeen ac996c6686 xfstests: add local.config example
I think it'd be useful to have a local.config template in the
git repo, to avoid having to re-read the README each time
to remember the required environment variable names.

Thoughts?  Am I just lazy?  :)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 10:36:53 -05:00
Prasad Joshi 9ea06dcee7 xfstests: Assume yes when test device is not partitioned
If an entire device used for file system creation, the mkfs.ext2/3/4
asks for confirmation before proceeding. Since the device is
configured for testing it is safe to assume positive response
during mkfs.

The patch also replaces hard coded mkfs path with MKFS_PROG variable.

Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 08:48:29 -05:00
Ben Myers e70927849a xfstests: rename configure.in to configure.ac
configure.in has been renamed to configure.ac.  Update the Makefile.

Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
2012-10-25 14:57:56 -05:00
Mike Frysinger ebc2cf34a7 xfstests: install shared libs with +x bits
These are shared libs w/executable code, so make sure they have +x bits
set on them.  Some kernels will proactively disallow executable mmaps if
the files lack +x bits.  It's also the right thing to do.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-10-24 16:57:50 -05:00
Mike Frysinger e3ca126a49 xfstests: respect DESTDIR when installing
This makes the `make install DESTDIR=...` form work.  It keeps support
for all previous forms too (like DIST_ROOT).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-10-24 16:55:04 -05:00
Mike Frysinger d197ba92ba xfstests: rename configure.in to configure.ac
Newer autotools warn and start to error with the older name.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-10-24 16:50:10 -05:00
Lukas Czerner 0b85927310 xfstests: Do not allow step to be zero
Currently 'step' variable which is used as length of the range to
discard can be zero. However it would result in error returned by the
fstrim.

Fix this by forcing 'step' to be at least 4KB.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-24 13:11:56 -05:00
Lukas Czerner 00d1bda60d xfstests: Test FITRIM where length is smaller than FSB
This tests corner case in FITRIM implementation where range size is
smaller than file system block or zero. In this case FITRIM should fail
with EINVAL.

The problem was spotted in xfs and ext4 where in case of length = 0 the
'end' variable underflowed. In case of length smaller than 1 FSB FITRIM
finished successfully, but we really should rather return EINVAL in both
cases.

(This patch has to be applied after 'Use upstream version of fstrim
instead of the local one')

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-24 12:43:33 -05:00
Tomas Racek 8ddf4d1a1e Use upstream version of fstrim instead of the local one
Local version of fstrim was dropped so that we depend on upstream
version which is now available via FSTRIM_PROG. _require_fstrim was
added to check if fstrim is available in the system and
_test_batched_discard to check if we can run fstrim on certain
mountpoint.

Also tests 251 and 260 were modified to reflect this change.

Signed-off-by: Tomas Racek <tracek@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-24 12:18:11 -05:00
Eric Sandeen 680e88e7ca xfstests 068: Add mmap load
Test 068 is the go-to test for freeze deadlock coverage;
unfortunately it only uses fsstress, which doesn't do any
mmap IO.

Using the existing fstest binary gets us a cheap mmap
exerciser as well.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
2012-10-01 08:40:19 -05:00
Jeff Liu 7bb8e28b91 xfstests: fix a compile warning at seek_sanity_test.c
Fix the compiler report warning at seek_sanity_test.c:
seek_sanity_test.c:46:3: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'int'

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
2012-09-24 15:24:22 -05:00
Jeff Liu ee9f5bd491 xfstests: improve test 286 for repeated unwritten/hole extents.
Enlarge the test coverage of 286 to includes file mapping with repeated
hole/unwritten/unwritten_without_data/data intersections.

Those two new sub-tests could help verifying the current seek_data/seek_hole
improvements.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>

 286 |   87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 86 insertions(+), 1 deletion(-)
2012-09-24 15:24:22 -05:00
Eric Sandeen 6565b7986e xfstests: add _require_freeze and minor cleanups
More filesystems have grown freeze capability, so rather than
hardcoding several in _supported_fs, make tests 068 and 280
generic and then add a new _require_freeze() which checks whether
the fs under test can be frozen before beginning the test.

Minor other cleanups to 280:
- remove extra _supported_fs line
- clear $seq.full before beginning

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-09-24 11:53:05 -05:00
Tao Ma 13149d529b xfstests: 275, Don't remove all the files in SCRATCH_MNT.
After the volume is mkfsed, it should have no other files that
need to be rmed. And what's more, it makes ext4 complain since
lost+found is also removed.

So remove this useless "rm -rf $SCRATCH_MNT/*".

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-09-21 11:16:24 -05:00
Brian Foster 8ca940b70b xfstests: fix TEST_MNT typos (should be TEST_DIR)
We mistakenly use TEST_MNT in tests 222 and 253, which is undefined.
Replace these two instances with TEST_DIR.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-09-21 11:06:03 -05:00
Jan Kara 61a726e9e3 xfstests: Make test 272 work for ext3
ext3 does not support direct IO for files with data journalling. This
confuses test 272. Make the test check whether open succeeds and perform
the writing only if it does.

Thanks for Dave Chinner for suggesting a simpler way to fix the test.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-09-18 16:20:34 -05:00
Ben Myers 681a33182c Merge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev
Conflicts:
	285
	285.out
	group

Moved '285: Test xfs projid32bit functionality a bit more extensively' to 287.
2012-09-13 15:01:58 -05:00
Eric Sandeen 053126503b 285: Test xfs projid32bit functionality a bit more extensively
The test covers several areas including enabling projid32bit
functionality dynamically by xfs_admin, dumping, restoring, quota
reporting and xfs_db projid values reporting.

This test case hits a bug with xfsdump/xfsrestore process on a
projid32bit enabled filesystem.

Eric Sandeen: change {16,32}less filenames to {16,32}bit, add quick group

Signed-off-by: Boris Ranto <ranto.boris@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2012-09-12 13:53:27 -05:00