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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
_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.
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>
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>
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>