Commit Graph

1136 Commits

Author SHA1 Message Date
Dave Chinner 771e69de67 xfstests: Convert all tests to use /bin/bash
While most tests use /bin/sh, they are dependent on /bin/sh being a
bash shell.  Convert all the tests to execute via /bin/bash as it is
much, much simpler than trying to debug and remove all the bashisms
throughout the test code.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2010-01-20 10:27:08 +11:00
Dave Chinner 387165ab40 xfstests: Use common rules to build binaries
Remove explicit target-per-file rules in the subdirectories being
built and replace them with target based rules using the buildrules
hooks for doing this.  This results in the makefiles being simpler,
smaller and more consistent. It does mean that all binaries are
linked against the common set of libraries but this does not cause
any harm.

This patch does not address the dmapi subdirectory of the xfstests
build system.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-20 10:26:10 +11:00
Dave Chinner 50f99d08ef xfstests: Clean up build output
We don't need to see every compiler command line for every file that
is compiled. This makes it hard to see warnings and errors during
compile. For progress notification, we really only need to see the
directory/file being operated on.

Turn down the verbosity of output by suppressing various make output
and provide better overall visibility of which directory is being
operated on, what the operation is and what is being done to the
files by the build/clean process.

This patch only addresses the top level makefile and build rules; it
does not clean up the subdirectories - these will be addressed by a
followup patch. It also does not touch the dmapi section of the
xfstests build system.

The old style verbose builds can still be run via "make V=1 ..."

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-20 10:26:01 +11:00
Alex Elder 8213960867 xfstests 219: ignore duplicates reported by repquota
Arrange to ignore duplicate entries reported by the repquota command.
This can happen if an id is used more than once (such as when two user
names are assigned the same uid).

Do this here by simply dropping any reported entries whose id number
has already been seen in the output.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-19 14:26:16 -06:00
Alex Elder d768aee6d6 xfstests 050: ignore duplicates reported by repquota
Arrange to ignore duplicate entries reported by the "repquota"
xfs_quota command.  This can happen if an id is used more than once
(such as when two user names are assigned the same uid).

Since we are already sorting the output we can accomplish this by
adding the "-u" (unique) option to the sort command.  Shorten some
long lines while we're at it.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-19 14:26:20 -06:00
Eric Sandeen 56f7241b4e xfstests 073: unmount source image in cleanup
Test 073 is currently failing w/ xfs_repair problems, and when
it does, the whole series stops because the test dir still has
a loopback mounted filesystem on it, and it can't unmount.

Fix that.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-17 10:35:23 -06:00
Eric Sandeen c3d103e121 xfstests 131: kill locktest process in cleanup & better error msgs
I occasionally get failures in 131 like:

gethostbyname: Success

1) perror is the wrong thing for gethostbyname errors, so this
is confusing

2) the locktest thread doesn't get killed, so the fs
is busy and the next test fails when it can't unmount

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-17 10:29:23 -06:00
Eric Sandeen 819521a94c xfstests 032: fix up mkfs.gfs2 args
Looks like gfs2 (recently?) needs more arguments for the
mkfs overwrite test.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Alex Elder <aelder@sgi.com>
2010-01-15 11:59:11 -06:00
Dave Chinner a015bad394 add simple xfs_fsr test
We have very little fsr test coverage in the test suite right now.
042 is the only test that runs it, and it only defragments a single
file.

Improve the coverage by simply running xfs_fsr of the test
filesystem. This gives xfs_fsr a wide variety of inodes to try to
defragment. A simple test like this would have tripped over the
attr2 fork offset problems in the swap extents ioctl long ago
thanks to the varied nature of inodes the test suite leaves around
in this filesystem.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2010-01-12 22:51:47 +01:00
Dave Chinner b9bf182314 filter log size in 206
With the log size now going past 128MB, test 206 creates a filesystem
with a much larger log than 128MB. The golden output expects at
128MB log size, so the test breaks. Filter the log size out of the
mkfs output and golden output so that the test works on both older and
newer mkfs binaries.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2010-01-12 22:49:57 +01:00
Dave Chinner 2b5159aa20 make unmounting loop devices in 073 work again
Loop devices are now created and destroyed on demand, and
the existing hacks to do this no longer work. Remove them.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2010-01-12 22:49:03 +01:00
Christoph Hellwig 1c0b332934 add a test for ctimes updates in futimens
Add a test to check if we update the ctime properly if not updating
the mtime in futimens.

Uses a C program contributed by Eric Blake <ebb9@byu.net>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
2010-01-12 22:47:21 +01:00
Christoph Hellwig 49743070d0 test quota log replay in 087
By mounting the filesystem with quotas enabled in 087 we exercise the
replay of the quota log items in this tests, which we otherwise don't
test in xfstests.  OSS bugzilla #855 is an example of something caught
by this.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
2010-01-12 22:45:26 +01:00
Eric Sandeen 3933846992 [PATCH] xfstests: add another fallocate test to 214
ext4 had a regression where it double-accounted used blocks
if you fallocated on top of delalloc blocks.  Ted sent a
c program to exploit it (see "fsstress-induced corruption reproduced"
on linux-ext4 on 12/31/2009) and it's trivial to do the same thing
within the xfstests framework using xfs_io.

This also changes the handcrafted xfs_io tests to use the
_require_xfs_io_falloc helper, not sure how that got missed.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-06 13:00:18 -06:00
Eric Sandeen fed5346d92 commit bd53c922 added src/aio-dio-regress to the top-level
Makefile so that it would get caught on make install, but
doing this unconditionally means that we tried to build that
subdir even if libaio headers weren't found.

Fix this up to do a properly chained make install through
the subdirs...

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-12-03 10:30:11 -06:00
Eric Sandeen af44e376ca Fix tests for lazy sb counter defaults
Fix tests which would be affected by a change to lazy-sb
by default.

All tests now explicitly -specify- -l lazy-sb=1 where appropriate,
so this can go in prior to a userspace change.

Unfortunately many of the logprint outputs must just be taken on faith.

Also, the irix flavors for e.g. 018.op.irix will need fixing up
if anyone cares.

This also needs the patch I just sent for xfs_db clearing attr2
in bad_features2 to complete w/o error.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-12-02 11:27:49 -06:00
Eric Sandeen 7dcd2217aa Add a test for ENOSPC when fallocating.
Also, add an expected output, not sure how that went missing!

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-11-25 16:12:09 -06:00
Izidor Matusov bd53c9223b Install src/aio-dio-regress tests on "make install"
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
2009-11-09 15:26:36 -06:00
Eric Sandeen 5dc4b247f2 xfstests: fix up have_xlog_assign_lsn config test for loggen
Without this we weren't building src/loggen

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-11-03 09:38:07 -06:00
Christoph Hellwig 728773d818 xfstests: add another quotaoff testcase to 220
Add the quotafile space remove regression test from Ryota Yamauchi to
testcase 220.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2009-11-03 15:29:50 +01:00
Christoph Hellwig a34e0fddd1 test 220: double inode free in xfs_dqrele_inode
Trivial test case that mounts a filesystem with user quotas, then turns
quotas off an unmounts.  Based on a testcase in a bug report from
Utako Kusaka <u-kusaka@wm.jp.nec.com>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2009-10-30 06:41:33 +01:00
Jaroslav Barton 08ea701634 _check_generic_filesystem support for fsck parameters
_check_generic_filesystem now support fsck parameters. Fsck parameters
can be passed by FSCK_OPTIONS environmental variable. Default values
will be used if FSCK_OPTIONS is missing or empty (same mechanism as
MOUNT_OPTIONS and MKFS_OPTIONS).

_check_extN_filesystem function is no longer needed, extN filesystem are
properly handled by default values in _check_generic_filesystem.
2009-09-16 09:55:59 -03:00
Christoph Hellwig dfdb145fbc xfstests: fix 192 for external logs and enable it by default
Use _test_mount instead of plain mount to make it work with external logs.

Enable it by default now that it runs everywhere.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2009-09-02 15:00:17 -03:00
Theodore Ts'o 8b61ae6352 add ext2/3/4-specific _check_extN_filesystem function
The _check_generic_filesystem function doesn't force a full filesystem
check, so filesystem inconsistencies after a test wouldn't be noticed.
To fix this, I added an extN specific check filesystem function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2009-08-27 18:17:32 -03:00
Eric Sandeen ae2c20fd77 Add some very basic quota sanity tests for generic filesystems.
This is based on test 108, but uses the generic quota tools,
not xfs_quota, and therefore cannot test project quota.

Also, the IOs are much smaller (48k) so that ext3 won't get into
indirect blocks and throw off the accounting.  This does
assume 4k blocks though.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Lachlan McIlroy <lmcilroy@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-08-10 13:18:39 -05:00