Commit Graph

1090 Commits

Author SHA1 Message Date
Eric Sandeen 67fbcc9c08 allow more xfs_io tests to be generic
These tests just do generic reads & writes with xfs_io;
if we add a "-F" they will run on other filesystems.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-09 10:32:29 -05:00
Eric Sandeen aa31b54565 Allow fsx tests to run on generic filesystems
There is already logic in 075 to gracefully skip nfs for fsx
invocations with -x (xfs-specific preallocation) - just extend
this to any non-xfs filesystem, and add to test 112 as well.

Later we can change this behavior to use fallocate and include
more filesystems but this gets some fsx coverage for now.

Test 127 doesn't seem to have anything xfs-specific, so mark
that as generic too.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-08 11:27:23 -05:00
Eric Sandeen aec4f29390 Make "new" script insert appropriate license on tests
Don't default to SGI copyright, someone else may be
making this test...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-05 17:07:20 -05:00
Felix Blyakher 491d467f3c Add GPL license plate to SGI's files.
Signed-off-by: Felix Blyakher <felixb@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
2009-06-05 15:41:14 -05:00
Eric Sandeen 2341811efd update aio-stress.c, with copyright information intact
Pulled from:
http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/kernel/io/ltp-aiodio/aio-stress.c
revision 1.8

There are a couple new options, but the main motivator is to
get the license text intact again.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-05 14:12:27 -05:00
Dave Chinner 7ba06df936 add license boilerplate to 205
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2009-06-05 11:51:55 +02:00
Eric Sandeen 8eac986fe4 aio-dio-regress: fix aio-dio-extend-stat on s390
This patch:

o Changes the BUFSIZE to 4096 so that we can successfully perform direct
  I/O on devices that have a sector size of 4k, such as the virtual disks
  found on the s390 architecture.
o Removes an unused variable.
o Checks the proper field in the ioevent to determine if there was an
  error in the I/O submission.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Zach Brown <zach.brown@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2009-06-04 16:32:24 -05:00
Eric Sandeen 66b36d1952 Revert "aio-dio-regress: fix aio-dio-extend-stat on s390"
This reverts commit 6b26794772.

A later version of this patch was submitted, and I committed
the wrong one.  -Eric
2009-06-04 16:29:39 -05:00
Christoph Hellwig 74cff05770 xfstests: fix syntax error in check
Bash 3.2 wants a space before the closing "]" in a test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
2009-06-04 19:12:55 +02:00
Eric Sandeen dcb3106e20 Check for xlog_assign_lsn in xfs headers
Checking for libxfs.h isn't enough; some debian installs
have libxfs.h but no xlog_assign_lsn, and the loggen build still
fails.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Tested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-03 15:15:15 -05:00
Jeff Moyer be64a1a99b Hi,
So, the xfs test suite does a mount, followed by running the test, then
an unmount after the test exits.  aio-dio-invalidate-failure spawns two
children, and will kill them off before it exits.  The problem is that
it doesn't wait for them to exit before returning, so the xfs test
harness ends up failing the umount as the mount point is still busy.

The fix is to simply wait for each of the children exits before
returning from the parent.

(Eric Sandeen: add one more waitpid to error case)

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2009-06-03 15:13:53 -05:00
Jeff Moyer 6b26794772 aio-dio-regress: fix aio-dio-extend-stat on s390
Hi,

The following patch queries the sector size of the underlying device so
that we can size the write buffer appropriately.  Without this patch, we
try to do an O_DIRECT write of 1KB to a device that has a sector size of
4KB.  This returns EINVAL, of course.  I also noticed that the test was
not checking the right fields for the return code.  It was checking the
original iocb's nbytes field instead of event->res.  So, I fixed that.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2009-06-03 15:11:24 -05:00
Jeff Moyer 4683b6d261 aio-dio-regress: align I/O buffers to 4k for 4k sector devices
(and virtual devices as found on s390)

Without this patch, these tests can randomly fail on s390 systems which
use a virtual block device with sector size of 4k.  Testing confirms
that this patch resolves the issue.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2009-06-03 15:09:34 -05:00
Eric Sandeen c639e76bdb Add aio-dio-regress tests
Pull in the aio-dio-regress test suite from
http://git.kernel.org/?p=linux/kernel/git/zab/aio-dio-regress.git

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-03 15:07:02 -05:00
Eric Sandeen e17b2a1acb don't run 122 if required headers aren't found
Now that libxfs etc is optional, 122 (which compiles on the fly)
is failing if those extra headers are missing.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-03 13:12:20 -05:00
Eric Sandeen 3ae9f2f8e8 Make the SCRATCH_DEV optional
Tests will fail gracefully if there is no SCRATCH_DEV defined, so change

the check script to allow it, and update README to reflect this.

This just makes it simpler to set up the tests, at the expense of
coverage.

Long term it might be nice to allow either SCRATCH_DEV xor TEST_DEV
to be missing, but for now this is simple.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-03 13:11:35 -05:00
Eric Sandeen 485db19e3c enable generic filesystems to be checked
This includes a fair bit of rearranging to avoid code duplication,
but the goal is to allow 'fsck -n -t $FSTYP $device' to be run on
any generic filesystem.

Any FS for which this doesn't work will need it's own fsck routine.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2009-06-02 22:42:21 +02:00
Eric Sandeen 1e814bd4f3 libxfs.h is really only needed for the loggen test;
make it config-time optional.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
2009-06-02 15:36:13 -05:00
Eric Sandeen 288f540b00 xfstests: initial reiserfs, gfs2, btrfs support
This patch gets reiserfs, gfs2, and btrfs off the ground.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-29 15:12:28 -05:00
Eric Sandeen 4b4365ee4e Fix 206 expected output
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-29 13:02:59 -05:00
Eric Sandeen a6c2e775ee Test trim of last small AG for large filesystem resizes
As reported at
http://article.gmane.org/gmane.comp.file-systems.xfs.general/29187
this trimming may cause an overflow in the new size calculation.

Patch to fix it, and testcase at
http://article.gmane.org/gmane.comp.file-systems.xfs.general/29193

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-29 12:48:23 -05:00
Eric Sandeen f6f91258b8 xfstests: add GPL boilerplates to my testcases
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
2009-05-28 13:27:36 -05:00
Eric Sandeen 2014d88a12 Report which tests did get run
fs type mismatches are now likely enough that it may be
nice to report which tests -were- run at the end...

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:40:39 -05:00
Eric Sandeen 5c8455c5d9 Set default extN mount options
ext2/3/4 don't support acls & attrs w/o specific mount
options, so make those the default whenever we mount
these filesystems.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:39:20 -05:00
Eric Sandeen 39964bfaa2 Detect FS type to test based on TEST_DEV
This helps support generic / non-xfs fileystems.

Rather than defaulting to xfs or expecting a fs
type passed in, just look at what is on TEST_DEV
and use that for FSTYP by default.

We may wish to add a generic way to override this later.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
2009-05-27 13:44:57 -05:00