Commit Graph

1084 Commits

Author SHA1 Message Date
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
Eric Sandeen 914f5260d0 Set up testdir for generic filesystems
Make the default filesystem testdir setup the same as
what xfs did; simply set up the testdir variable.

Update the comment for UDF & NFS, as to why they are
currently doing something different.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:38:16 -05:00
Eric Sandeen b0018ecef8 069: make scratch mkfs quiet
The _scratch_mkfs call in test 069 was not redirecting
stderr to /dev/null; other mkfs's may be more noisy
on stderr.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:37:56 -05:00
Eric Sandeen 7737a5d7fb Support "generic" filesystem type
Create a new "generic" _supported_fs type for tests
which are not really filesystem-specific.  "generic"
tests do expect that acl & attr are supported though.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:37:38 -05:00
Eric Sandeen 7a2ae4184b Use xfs.h rather than libxfs.h
Use xfs/xfs.h when possible rather than xfs/libxfs.h,
now that libxfs.h isn't part of a normal xfsprogs-devel
install.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:36:27 -05:00
Eric Sandeen 84567e4977 Drop the xfs-specific MAXNAMELEN in favor of the Posix NAME_MAX
This makes it easier to lose libxfs.h later.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:35:56 -05:00
Christoph Hellwig f381f98206 xfstests: move GPL boilerplates to fix lsqa.pl
It turns out lsqa.pl nees the test number and description first in the
file, so move the GPL boilerplates below it.

Also remove acouple of cases where we have one full copyright line + gpl
boilerplate before the description and another copyright line after
the description.

Signed-off-by: Christoph Hellwig <hch@lst.de>
2009-05-28 17:04:15 +02:00