xfstests-dev.git
13 years agoxfsqa: build dbtest on debian platforms
Dave Chinner [Tue, 4 May 2010 06:01:26 +0000 (16:01 +1000)]
xfsqa: build dbtest on debian platforms

Set up autoconf to find the correct headers and compat libraries for
debian squeeze, and massage the includes to ensure the right headers get
included. Also fix a compile warning that was emitted now that it is being
compiled.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfsqa: keep xfs_fsr output around in test 222
Dave Chinner [Tue, 4 May 2010 06:01:36 +0000 (16:01 +1000)]
xfsqa: keep xfs_fsr output around in test 222

To confirm that xfs_fsr is doing the right thing, make it output debug
and verbose messages and store them in the 222.full file so that it
can be checked after the fact for correct operation.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfsqa: clean up 030 repair output
Dave Chinner [Tue, 4 May 2010 06:01:47 +0000 (16:01 +1000)]
xfsqa: clean up 030 repair output

With the new checks in xfs_repair, it outputs more information
about errors found than previously. This new output can be ignored
for the purposeŃ• of this test, so filter it all out. This will
allow the test to run on new and old reapir binaries.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: fix fiemap-tester when build without fallocate
Christoph Hellwig [Sat, 1 May 2010 13:12:56 +0000 (15:12 +0200)]
xfstests: fix fiemap-tester when build without fallocate

Make sure at least the tests passing -p0 like xfstests 225 can work when
built without fallocate support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoxfsqa: more sh to bash conversions
Dave Chinner [Wed, 28 Apr 2010 23:59:24 +0000 (09:59 +1000)]
xfsqa: more sh to bash conversions

A new test is using /bin/sh and failing on debian. Clean it up and all the
remaining uses of /bin/sh.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfsqa: new fsr defragmentation test
Dave Chinner [Wed, 28 Apr 2010 05:34:06 +0000 (15:34 +1000)]
xfsqa: new fsr defragmentation test

This test aims to recreate the conditions that caused xfs_fsr to
corrupt inode forks. The problem was that the data forks between the
two inodes were in different formats due to different inode fork
offsets, so when they swapped the data forks the formats were
invalid.

This test generates a filesystem with a known fragmented freespace pattern and
then abuses known "behaviours" of the allocator to generate files
with a known number of extents. It creates attributes to generate a
known inode fork offset, then uses a debug feature of xfs_fsr to
attempt to defrag the inode to a known number of extents.

By using these features, we can pretty much cover the entire matrix of inode
fork configurations, hence reproducing the conditions that lead to corruptions.
This test has already uncovered one bug in the current kernel code, and the
current fsr (with it's naive attribute fork handling) is aborted on a couple of
hundred of the files created by this test.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
14 years agoxfststests 226: test for prealloc/delalloc/reserved space recapture
Eric Sandeen [Fri, 16 Apr 2010 18:20:54 +0000 (13:20 -0500)]
xfststests 226: test for prealloc/delalloc/reserved space recapture

Test writing and removing a file in a loop; filesize is 64m,
filesystem size is 256m.  Loop 16 times each for buffered and
direct.

ext4 hits enospc after a couple loops.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agoxfstests: make sure $seq.full files don't land in /
Eric Sandeen [Fri, 16 Apr 2010 16:36:22 +0000 (11:36 -0500)]
xfstests: make sure $seq.full files don't land in /

186 and 192, at least, were landing (part of) their $seq.full
files in /

Fix this by using $here/$seq.full where needed.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: 125: run ftrunc with relative path
Lukas Czerner [Fri, 16 Apr 2010 15:50:01 +0000 (10:50 -0500)]
xfstests: 125: run ftrunc with relative path

Since ftrunc is invoked with su $qa_user, it can fail when absolute path
is not accessible to everyone.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfstests: don't use -s option to repquota
Christoph Hellwig [Mon, 5 Apr 2010 19:48:52 +0000 (21:48 +0200)]
xfstests: don't use -s option to repquota

The -s option to repquota used to be a no-op, but actually changes
output to different units in quota tools 4.0.  Remove it from the
repquota invocation in test 219.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Tested-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoxfstests: exit non-0 if fs check fails
Eric Sandeen [Thu, 1 Apr 2010 03:01:11 +0000 (22:01 -0500)]
xfstests: exit non-0 if fs check fails

Right now if any of the _check_scratch_fs tests etc fail,
the check script exits but with 0 status.

This change will cause the status to be non-0 so we can detect
the error.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: David Chinner <david@fromorbit.com>
14 years agoxfstests: use $TEST_DIR in 225
Eric Sandeen [Wed, 24 Mar 2010 16:11:51 +0000 (11:11 -0500)]
xfstests: use $TEST_DIR in 225

Oops, another hard-coded /mnt/test

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: drop readlink of test devices
Eric Sandeen [Wed, 24 Mar 2010 16:12:32 +0000 (11:12 -0500)]
xfstests: drop readlink of test devices

Comments say it's for devfs; it's actually breaking lvm devices, now.
I think we can just drop it.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: filter 203 mount point
Eric Sandeen [Wed, 24 Mar 2010 16:14:16 +0000 (11:14 -0500)]
xfstests: filter 203 mount point

Right now this only works if TEST_DIR == /mnt/test

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: avoid blkid cache with -c /dev/null not -p
Lukas Czerner [Fri, 12 Mar 2010 15:26:38 +0000 (09:26 -0600)]
xfstests: avoid blkid cache with -c /dev/null not -p

The addition of "-p" to blkid calls broke xfstests
on older systems where this was not supported.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix log filtering in 223's testcase
Dimitry Monakhov [Tue, 9 Mar 2010 17:59:46 +0000 (11:59 -0600)]
xfstests: fix log filtering in 223's testcase

Msg filter was missed in one place, so test failed if
$SCRATCH_MNT is different than /mnt/scratch.diff

Signed-off-by: Dimitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfsqa: define resblks for tests near ENOSPC
Dave Chinner [Sat, 6 Mar 2010 00:25:10 +0000 (11:25 +1100)]
xfsqa: define resblks for tests near ENOSPC

Several tests assume a certain amount of disk space free after the
reserve block pool is filled. Changing the default size of the
reserve block pool breaks these tests because there is less space
available that first thought.

Change these tests to specify a known reserve block pool size of
1024 blocks to ensure that they continue to work correctly even if
the default size changes.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfsqa: Add fiemap exerciser
Eric Sandeen [Sat, 6 Mar 2010 00:24:54 +0000 (11:24 +1100)]
xfsqa: Add fiemap exerciser

Preliminary fiemap testing support based on a test util written by
Josef Bacik.

For now it's only run with preallocation disabled, because xfs has a
tendency to fill in holes with data blocks (EOF prealloc stuff I
think) and similar for explicit preallocation, so this is breaking
the preallocation tests for now, when it finds a "data" block where
it expects a preallocated block.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfsqa: fix size specification for scratch mkfs
Dave Chinner [Sat, 6 Mar 2010 00:24:38 +0000 (11:24 +1100)]
xfsqa: fix size specification for scratch mkfs

When making a specifically sized scratch filesystem, we need to
calculate the size rather than assigning the caclculation expression
to a variable and passing that into the _scratch_mkfs_sized
function. Currently sized filesystems are failing to be made and the
code is falling back to full sized filesystems so we are not testing
enospc issues correctly.

Signed-off-by: Dave Chinner <david@fromorbit.com>
14 years agoxfsqa: add delayed allocation @ ENOSPC exerciser
Dave Chinner [Sat, 6 Mar 2010 00:22:58 +0000 (11:22 +1100)]
xfsqa: add delayed allocation @ ENOSPC exerciser

When we deplete the reserve block pool or receive an error during
delayed allocation, we currently toss the page away. If that page
has delayed allocation extents on it, we can fail to remove them and
leave stale delayed llocation extents lying around on the inode.
This can, in certain circumstances, trigger errors later on when the
stale delalloc extent it found again, including tripping a BUG().

Exercise this failure path so that we get code coverage of the fix
that prevents stale delalloc mappings from being left on the inode
when pages are tossed.

This is based on a test case supplied by Lachlan McIlroy.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: don't delete scratch loop device w/ umount -d
Eric Sandeen [Fri, 19 Feb 2010 15:34:33 +0000 (09:34 -0600)]
xfstests: don't delete scratch loop device w/ umount -d

Recent fixes to 073 added umount -d, but if we happen
to be using a scratch device on loopback, subsequent
tests get very, very unhappy when their loopback block
device goes away!

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: mount xfs with a context when selinux is on
Eric Sandeen [Fri, 19 Feb 2010 15:33:45 +0000 (09:33 -0600)]
xfstests: mount xfs with a context when selinux is on

When selinux is on, we get tons of new xattrs, which messes
up all kinds of output.

The simplest way out of this, for now, seems to be to just mount
with a global context instead and skip writing the extra xattrs.

I've been using this internally on Fedora and RHEL for a while now.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <david@fromorbit.com>
14 years agoxfstests: 077 should require fsgqa user
Eric Sandeen [Fri, 19 Feb 2010 15:32:54 +0000 (09:32 -0600)]
xfstests: 077 should require fsgqa user

Running on a newly-provisioned box:

077  - output mismatch (see 077.out.bad)
 --- 077.out 2010-02-17 11:22:35.275052872 -0500
 +++ 077.out.bad 2010-02-17 11:59:48.979053106 -0500
 @@ -1,6 +1,7 @@
 QA output created by 077
 *** create filesystem
 *** set default ACL
+setfacl: Option -m: Invalid argument near character 3
 *** populate filesystem, pass #1
 *** populate filesystem, pass #2
 *** all done

because we didn't have the fsgqa user, and tried:

# setfacl -R -dm u:fsgqa:rwx,g::rwx,o::r-x,m::rwx ...

instead should have had:

077  [not run] fsgqa user not defined.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: use blkid raw mode
Christoph Hellwig [Mon, 15 Feb 2010 09:01:21 +0000 (10:01 +0100)]
xfstests: use blkid raw mode

blkid without options usually gets no probe results at all just after
creating a filesystem.  This problem is due to the cache that blkid
uses in it's default mode, and is unlikely to get fixed.  Use the -p
option to bypass the cache layer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
14 years agoxfstests: fix awk syntax error in 219
Christoph Hellwig [Mon, 15 Feb 2010 09:00:46 +0000 (10:00 +0100)]
xfstests: fix awk syntax error in 219

There's one brace too many here - this was pointed out in the review
but slipped back into the commited patch.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
14 years agoxfstests: fix some warnings
Alex Elder [Fri, 12 Feb 2010 20:49:45 +0000 (20:49 +0000)]
xfstests: fix some warnings

Fix a couple of build warnings.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: 219: fix awk filter for duplicate users
Alex Elder [Wed, 3 Feb 2010 19:54:04 +0000 (19:54 +0000)]
xfstests: 219: fix awk filter for duplicate users

The filter I added for removing duplicate users from the
output of repquota didn't do the job very well.  This
fixes that, making it so the first time a user is seen
its line is printed, not thereafter.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: make 204 generic
Eric Sandeen [Tue, 9 Feb 2010 22:05:51 +0000 (16:05 -0600)]
xfstests: make 204 generic

204 can be generic.

Also remove a stray _scratch_mkfs that snuck into
_scratch_mkfs_sized :/

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix up fs_perms test used by 126
Eric Sandeen [Tue, 9 Feb 2010 17:59:23 +0000 (11:59 -0600)]
xfstests: fix up fs_perms test used by 126

Test 126 was failing intermittently for Ted & I; it seems that
this is because we were passing an unterminated string to
fopen for the mode; I'm not certain why this made it fail,
but it's pretty clearly not a good thing to do, and fixing
it fixes the test.

Rather than passing around characters, do things string-wise,
since that is what is ultimately used in fopen().

Reported-by: Theodore Tso <tytso@mit.edu>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: rename _acl_requirements to _require_acls
Eric Sandeen [Fri, 5 Feb 2010 17:04:10 +0000 (11:04 -0600)]
xfstests: rename _acl_requirements to _require_acls

Most requirement tests are named _require_foo, so just
make this more consistent.

Also remove a few redundant tests for /usr/bin/chacl
since _require_acls covers that.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: make 053 and 077 generic
Eric Sandeen [Fri, 5 Feb 2010 17:03:37 +0000 (11:03 -0600)]
xfstests: make 053 and 077 generic

053 and 077 can be generic w/ a little tweaking.

Also change 077's filler to something more likely
to be on a random system under test, and add it
to the enospc group.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: routine to create scratch of certain size
Eric Sandeen [Fri, 5 Feb 2010 17:03:01 +0000 (11:03 -0600)]
xfstests: routine to create scratch of certain size

This is needed for later enospc tests to be generic

We have to explicitly call the mkfs rather than
_scratch_mkfs since extN wants nr-of-blocks as
an argument -after- the device name.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: 223 - test file alignment on stripe geometry
Eric Sandeen [Wed, 3 Feb 2010 16:43:53 +0000 (10:43 -0600)]
xfstests: 223 - test file alignment on stripe geometry

A first-cut test to ensure that files are well-aligned on filesystems
with stripe geometry.

Several sizes of stripe units are mkfs'd, and then files are written
and fallocated in various multiples of those stripe sizes.
Each file is checked to ensure that the first block is
stripe-aligned.

(Ideally, for any fragmented files, we should ensure that each
fragment start is well-aligned, but this does not do that yet)

(slightly unrelated: don't send scratch mkfs output to /dev/null,
we'd like to see mkfs output and direct it to $seq.full - this
more or less matches _scratch_mkfs_xfs behavior and doesn't
break any tests that I can see)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: filter selinux output in _acl_ls etc
Eric Sandeen [Wed, 3 Feb 2010 14:35:24 +0000 (08:35 -0600)]
xfstests: filter selinux output in _acl_ls etc

When selinux is on, ls -l gives us a "." to indicate selinux
attrs, which breaks some tests:

 === Test minimal ACE ===
 Setup file
--rwxrw-r-- id1 id2 file1
+-rwxrw-r--. id1 id2 file1

so make an _ls_l helper to filter that out.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: helper to detect fs free space
Eric Sandeen [Tue, 2 Feb 2010 23:23:58 +0000 (17:23 -0600)]
xfstests: helper to detect fs free space

Make a common helper to skip a test if there's not enough
free space on the target fs.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix compilation of iopat targets
Christoph Hellwig [Wed, 27 Jan 2010 20:36:28 +0000 (21:36 +0100)]
xfstests: fix compilation of iopat targets

Now that PREALLO_TARGETS is gone these tests must be listed in the main
LINUX_TARGETS list.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfstests: Automatic build dependency calculations
Dave Chinner [Tue, 26 Jan 2010 03:22:35 +0000 (14:22 +1100)]
xfstests: Automatic build dependency calculations

Currently the xfstest builds do not have any automatic dependency
calculations. It relies on a separate make depend run to build or
update dependency information. It also relies on an external
makedepend binary. If that binary does not exist, the dependencies
do not get calculated.

To remove the dependency on makedepend, gcc can be used instead as
it has a command to generate dependency information. This patch
changes the dependency rule building to use gcc.

In case anyone uses an old (several years) gcc compiler or a
compiler that doesn't support gcc compatible dependency generation,
a new configure check is added to turn off dependency checking so
builds can still be done.

To use the dependencies automatically, we need to use a special
include makefile directive to include the build dependencies into
the current makefile.  Essentially once the dependencies are
calculated, they can be included into the makefile and make will
recalculate the build dependencies automatically based on that
information.

Hence we get a build that automatically calculates and keeps
dependencies up to date without dependence on any external tools.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: rebuild aclocal.m4
Dave Chinner [Tue, 26 Jan 2010 03:21:47 +0000 (14:21 +1100)]
xfstests: rebuild aclocal.m4

The local m4 configuration has not been built in a long time.
Trying to rebuild it results in failures with dmapi library
detection and libxfs.h detection macros. Fix the errors and rebuild
it.

Note: the new format for the aclocal.m4 file uses m4_include
directives which means it is much smaller than before and won't
need updating unless we include new m4 macro files.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: deprecate busted log printing tests
Dave Chinner [Tue, 26 Jan 2010 03:26:42 +0000 (14:26 +1100)]
xfstests: deprecate busted log printing tests

Tests 018, 081 and 082 read the contents of the log and assume that the
contents will always be the same. They are trying to ensure that the
contents of the log don't change for a given fixed load.

This has several problems - high level changes to the filesystem and
VFS code can change the order and contents of the log. Changes to
the way we sync the filesystem will change the contents of the log.
background writeback occurring in the middle of the test will change
the contents of the log by allowing the tail to move. Even changes
to the default mkfs parameters can break them!

The tests also assume that unmount leaves a dirty log behind. We've
fixed lots of problems in sync and the unmount paths over recent
times, so now a clean unmount leaves a clean log behind. That is,
there is nothing left in the log print output for these tests to
check. IOWs, major surgery is required for these tests to be
returned to their former break-when-something-changes behaviour.

However, these tests are a maintenance nightmare. They spend more
time broken and failing than they do passing, and then it's not long
before they get broken again. They have to cover all sorts of
different permutations of log configurations and that will continue
to grow and increase the complexity of making these tests continue
to work. And to top it all off, I can't remember a bug actually ever
being found by these tests. Hence I think we should just stop using
them altogether.

So this patch deprecates 018, 081 and 082 rather than fixes them.
It introduces a "deprecated" test group and puts them in it. That
means the tests can still be run on older systems where they may
have some use, but will not be run automatically any more, nor
will any attempt be made to keep them up to date or working.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: simplify build of preallo_rw_pattern_reader/writer
Christoph Hellwig [Thu, 21 Jan 2010 11:32:50 +0000 (11:32 +0000)]
xfstests: simplify build of preallo_rw_pattern_reader/writer

Instead of having complicated build system hacks just create two
two-line source files defining READ/WRITE and including iopat.c

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoxfstests: fix format string warning in aio-dio-extend-stat.c
Christoph Hellwig [Thu, 21 Jan 2010 17:32:36 +0000 (18:32 +0100)]
xfstests: fix format string warning in aio-dio-extend-stat.c

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agoxfstests: fix format string warnings in locktest.c
Christoph Hellwig [Thu, 21 Jan 2010 17:31:50 +0000 (18:31 +0100)]
xfstests: fix format string warnings in locktest.c

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agoxfstests: kill in 131 needs to be quiet
Dave Chinner [Wed, 20 Jan 2010 21:54:38 +0000 (08:54 +1100)]
xfstests: kill in 131 needs to be quiet

If the kill fails because the processes have already terminates,
the output from kill (no such process) will cause the test to
fail. Make sure kill doesn't output anything.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: don't redefine _GNU_SOURCE in aio tests
Dave Chinner [Wed, 20 Jan 2010 21:54:31 +0000 (08:54 +1100)]
xfstests: don't redefine _GNU_SOURCE in aio tests

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix printf warnings in locktest.c
Dave Chinner [Wed, 20 Jan 2010 21:54:23 +0000 (08:54 +1100)]
xfstests: fix printf warnings in locktest.c

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix printf format warnings in looptest.c
Dave Chinner [Wed, 20 Jan 2010 21:54:16 +0000 (08:54 +1100)]
xfstests: fix printf format warnings in looptest.c

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix compile warnings in iopat.c
Dave Chinner [Wed, 20 Jan 2010 21:54:08 +0000 (08:54 +1100)]
xfstests: fix compile warnings in iopat.c

Printf format warnings and return value warnings need fixing.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix printf format warnings in aio-stress.c
Dave Chinner [Wed, 20 Jan 2010 21:54:01 +0000 (08:54 +1100)]
xfstests: fix printf format warnings in aio-stress.c

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: Don't use tempnam in growfiles.c
Dave Chinner [Wed, 20 Jan 2010 21:53:53 +0000 (08:53 +1100)]
xfstests: Don't use tempnam in growfiles.c

tempnam() generates a compiler warning as a dangerous function.
This code doesn't care about security issues with tempnam, so
remove it and just manually build the filenames without the
randomness of tempnam.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix bulkstat related compile warnings.
Dave Chinner [Wed, 20 Jan 2010 21:53:44 +0000 (08:53 +1100)]
xfstests: fix bulkstat related compile warnings.

Use correct types for bulkstat structure to avoid pointer warnings.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: fix compile warning in doio.c
Dave Chinner [Wed, 20 Jan 2010 21:53:27 +0000 (08:53 +1100)]
xfstests: fix compile warning in doio.c

Use of sigblock is deprecated. Use sigprocmask instead.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfsqa: filter the fsstress seed output in 104
Dave Chinner [Wed, 20 Jan 2010 21:53:17 +0000 (08:53 +1100)]
xfsqa: filter the fsstress seed output in 104

Otherwise it fails to match the golden output. Also add
the test to the auto group so that it is run regularly now
that the growfs problems are fixed.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfsqa: Fix signal usage in aio-dio test code
Dave Chinner [Tue, 19 Jan 2010 23:28:24 +0000 (10:28 +1100)]
xfsqa: Fix signal usage in aio-dio test code

Using signal() to set up signal handlers doesn't always do what you
want. A recent upgrade made test 208 fail because wait() was not
getting interrupted by a SIGALRM. Tracing showed that signal() was
being converted to a sigaction(SA_RESTART) handler, which allows
syscalls that return ERESTARTSYS to immediately restart without
returning EINTR to the calling process. The kernel code returns
ERESTARTSYS to signal interruptions while in wait().

Replace the use of signal with sigaction() to ensure that the
SA_RESTART flag is not set and the EINTR is delivered to the process
sitting in wait().  This makes test 208 terminate at 200s again.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfsqa: update 214 golden output
Dave Chinner [Tue, 19 Jan 2010 23:28:16 +0000 (10:28 +1100)]
xfsqa: update 214 golden output

It does not contain the output from the recently added test,
so fails when the test actually succeeds.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: Convert all tests to use /bin/bash
Dave Chinner [Tue, 19 Jan 2010 23:27:08 +0000 (10:27 +1100)]
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>
14 years agoxfstests: Use common rules to build binaries
Dave Chinner [Tue, 19 Jan 2010 23:26:10 +0000 (10:26 +1100)]
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>
14 years agoxfstests: Clean up build output
Dave Chinner [Tue, 19 Jan 2010 23:26:01 +0000 (10:26 +1100)]
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>
14 years agoxfstests 219: ignore duplicates reported by repquota
Alex Elder [Tue, 19 Jan 2010 20:26:16 +0000 (14:26 -0600)]
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>
14 years agoxfstests 050: ignore duplicates reported by repquota
Alex Elder [Tue, 19 Jan 2010 20:26:20 +0000 (14:26 -0600)]
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>
14 years agoxfstests 073: unmount source image in cleanup
Eric Sandeen [Sun, 17 Jan 2010 16:35:23 +0000 (10:35 -0600)]
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>
14 years agoxfstests 131: kill locktest process in cleanup & better error msgs
Eric Sandeen [Sun, 17 Jan 2010 16:29:23 +0000 (10:29 -0600)]
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>
14 years agoxfstests 032: fix up mkfs.gfs2 args
Eric Sandeen [Fri, 15 Jan 2010 17:59:11 +0000 (11:59 -0600)]
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>
14 years agoadd simple xfs_fsr test
Dave Chinner [Tue, 12 Jan 2010 21:51:47 +0000 (22:51 +0100)]
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>
14 years agofilter log size in 206
Dave Chinner [Tue, 12 Jan 2010 21:49:57 +0000 (22:49 +0100)]
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>
14 years agomake unmounting loop devices in 073 work again
Dave Chinner [Tue, 12 Jan 2010 21:49:03 +0000 (22:49 +0100)]
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>
14 years agoadd a test for ctimes updates in futimens
Christoph Hellwig [Tue, 12 Jan 2010 21:47:21 +0000 (22:47 +0100)]
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>
14 years agotest quota log replay in 087
Christoph Hellwig [Tue, 12 Jan 2010 21:45:26 +0000 (22:45 +0100)]
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>
14 years ago[PATCH] xfstests: add another fallocate test to 214
Eric Sandeen [Wed, 6 Jan 2010 19:00:18 +0000 (13:00 -0600)]
[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>
14 years agocommit bd53c922 added src/aio-dio-regress to the top-level
Eric Sandeen [Thu, 3 Dec 2009 16:30:11 +0000 (10:30 -0600)]
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>
14 years agoFix tests for lazy sb counter defaults
Eric Sandeen [Wed, 2 Dec 2009 17:27:49 +0000 (11:27 -0600)]
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>
14 years agoAdd a test for ENOSPC when fallocating.
Eric Sandeen [Wed, 25 Nov 2009 22:12:09 +0000 (16:12 -0600)]
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>
14 years agoInstall src/aio-dio-regress tests on "make install"
Izidor Matusov [Mon, 9 Nov 2009 21:26:36 +0000 (15:26 -0600)]
Install src/aio-dio-regress tests on "make install"

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
14 years agoxfstests: fix up have_xlog_assign_lsn config test for loggen
Eric Sandeen [Tue, 3 Nov 2009 15:38:07 +0000 (09:38 -0600)]
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>
14 years agoxfstests: add another quotaoff testcase to 220
Christoph Hellwig [Tue, 3 Nov 2009 14:29:50 +0000 (15:29 +0100)]
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>
14 years agotest 220: double inode free in xfs_dqrele_inode
Christoph Hellwig [Fri, 30 Oct 2009 05:41:33 +0000 (06:41 +0100)]
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>
14 years ago_check_generic_filesystem support for fsck parameters
Jaroslav Barton [Wed, 16 Sep 2009 12:55:59 +0000 (09:55 -0300)]
_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.

14 years agoxfstests: fix 192 for external logs and enable it by default
Christoph Hellwig [Wed, 2 Sep 2009 18:00:17 +0000 (15:00 -0300)]
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>
14 years agoadd ext2/3/4-specific _check_extN_filesystem function
Theodore Ts'o [Thu, 27 Aug 2009 21:17:32 +0000 (18:17 -0300)]
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>
14 years agoAdd some very basic quota sanity tests for generic filesystems.
Eric Sandeen [Mon, 10 Aug 2009 18:18:39 +0000 (13:18 -0500)]
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>
14 years agoSplit out xfs & generic quota existence tests
Eric Sandeen [Mon, 10 Aug 2009 18:18:50 +0000 (13:18 -0500)]
Split out xfs & generic quota existence tests

Make a new test to test for generic quota tools, for
generic filesystem testing.  Move the existing quota test
to a new "xfs" name.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Lachlan McIlroy <lmcilroy@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoTest a few very basic defragmentation scenarios.
Eric Sandeen [Mon, 10 Aug 2009 18:10:26 +0000 (13:10 -0500)]
Test a few very basic defragmentation scenarios.

This test creates some files, runs defrag on them,
and compares the before/after fragmentation as well
as file md5sums and timestamps.

The test currently expects to find e4defrag in
/usr/bin

It should be relatively easy to add more interestingly
fragmented files to the tests, as well as to test
that memory-mapped files aren't touched, etc -
but this gives us a framework.

V2: remount before checking file contents, and create
common.defrag.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoactually hook up 198, make it generic
Eric Sandeen [Thu, 30 Jul 2009 15:49:13 +0000 (10:49 -0500)]
actually hook up 198, make it generic

Not entirely sure how I managed this, but 198 was not in groups
so was never run - and wasn't in the makefile, so was never built.
Oops.

Fix that up, make it a generic test, and move it to the
aio-dio-regress subdir.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agodon't fail if nslookup is not found
Christian Kujau [Mon, 20 Jul 2009 09:31:39 +0000 (11:31 +0200)]
don't fail if nslookup is not found

When nslookup is not available, execution would stop. This patch moves the
check for nslookup and the _get_fqdn function into the ./new script (since
this is the only place where it's used) and we don't fail any more but try
to find out our FQDN without nslookup.

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agoadd missing golden output for test 215
Christoph Hellwig [Wed, 8 Jul 2009 17:00:40 +0000 (19:00 +0200)]
add missing golden output for test 215

Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agofix trivial typo in test 204 description
Christoph Hellwig [Tue, 7 Jul 2009 17:43:51 +0000 (19:43 +0200)]
fix trivial typo in test 204 description

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agosmall common.config cleanup
Christoph Hellwig [Tue, 7 Jul 2009 14:22:36 +0000 (16:22 +0200)]
small common.config cleanup

Don't list various non-mandatory options near the check for the
mandatory ones, and make the test for the mandatory ones a proper if
statements.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agodon't print scratch mkfs and mount options without scratch device
Christoph Hellwig [Tue, 7 Jul 2009 14:20:59 +0000 (16:20 +0200)]
don't print scratch mkfs and mount options without scratch device

Also clean up the way the test configuration is printed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfstests: add tests to check log size scaling
Dave Chinner [Tue, 7 Jul 2009 13:25:13 +0000 (15:25 +0200)]
xfstests: add tests to check log size scaling

Add two tests that check that log size scaling works correctly for old
and new maximum log sizes.

Signed-off-by: Dave Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agoxfstests: test c/mtime updates through mapped writes
Christoph Hellwig [Tue, 7 Jul 2009 10:35:56 +0000 (12:35 +0200)]
xfstests: test c/mtime updates through mapped writes

Check that we correctly update the timestamps when writing to a file
through an mmap mapping.  Currently fails for XFS due a VFS bug but
succeeds for many other filesystems.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoFix syntax error in common.rc
Eric Sandeen [Thu, 25 Jun 2009 15:14:24 +0000 (10:14 -0500)]
Fix syntax error in common.rc

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
14 years agofallocate + read/write tests, ext4 regression tests
Eric Sandeen [Wed, 24 Jun 2009 17:58:11 +0000 (12:58 -0500)]
fallocate + read/write tests, ext4 regression tests

New test to test basic mixed fallocate + read & write,
includes a couple regression tests for bugs that ext4
hit.  Uses xfs_io to generate fallocate calls, so requires
git xfsprogs and very recent glibc at this point.

Ext4 folks, this is hopefully a reasonable example of
how to add a new test.   :)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoMove duplicated xfs_io filters to common.filter
Eric Sandeen [Wed, 24 Jun 2009 17:57:24 +0000 (12:57 -0500)]
Move duplicated xfs_io filters to common.filter

Also fix up 132 output, which was misfiltered due
to a bug in the filtering.

Doing this because I need this same filter for the next
added test.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agobasic fallocate boundary tests
Eric Sandeen [Wed, 24 Jun 2009 17:58:30 +0000 (12:58 -0500)]
basic fallocate boundary tests

This is just like test 072, but using fallocate instead
of the xfs ioctl.  Just very basic fallocate tests.

Also adds a "prealloc" group (./check -g prealloc)
and a _require_xfs_io_falloc check.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agofix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional
Theodore Ts'o [Sat, 20 Jun 2009 17:14:14 +0000 (19:14 +0200)]
fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional

Commit 3ae9f2f8 purports to allow SCRATCH_DEV and SCRATCH_MNT to be
optional, but tests in common.config will cause check to exit with an
error if these environment variables are not defined.  Fix this problem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agofix _require_scratch test for extN, resierfs, gfs2, and btrfs
Theodore Ts'o [Sat, 20 Jun 2009 17:05:45 +0000 (19:05 +0200)]
fix _require_scratch test for extN, resierfs, gfs2, and btrfs

The extN, reiserfs, gfs2, and btrfs filesysytem types should use the
same check for a block device as XFS and UDF, and not the test for
NFS, which was checking for host:/foo/bar/baz when checking for a
scratch device.

Also, the NFS logic was also incorrect, in that it would allow a
zero-length SCRATCH_DEV to continue.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
14 years agoskip _check_test_fs unless a test is actually run
Theodore Ts'o [Sat, 20 Jun 2009 17:01:43 +0000 (19:01 +0200)]
skip _check_test_fs unless a test is actually run

Running _check_test_fs can take a non-trivial amount of time, and if a
test has been skipped because it doesn't work on Linux, or it doesn't
work of for ext4, it's pointless to re-run _check_test_fs.  So move
the call to _check_test_fs so it is only run if a test is actually run.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
14 years agoSkip dump _cleanup if filesystem is not xfs
Eric Sandeen [Wed, 10 Jun 2009 20:05:04 +0000 (15:05 -0500)]
Skip dump _cleanup if filesystem is not xfs

Many/most dump tests include common.dump before checking
supported fs, and this means that even if the dump tests
are skipped, the sleep & filesystem check in _cleanup
gets run, which makes it take rather a long time to
skip these tests for non-xfs filesystems.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoGracefully fail aio tests if they weren't built
Eric Sandeen [Wed, 10 Jun 2009 20:04:52 +0000 (15:04 -0500)]
Gracefully fail aio tests if they weren't built

configure & make succeeds w/o aio headers or libs,
so tests should handle that.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoEnable test 080 for Linux
Eric Sandeen [Tue, 9 Jun 2009 18:38:11 +0000 (13:38 -0500)]
Enable test 080 for Linux

Seems to work here... Also disable IRIX as supported,
since the comments & code say it doesn't work and
it short-circuits anyway.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoEnable still more tests for generic filesystems
Eric Sandeen [Tue, 9 Jun 2009 18:35:28 +0000 (13:35 -0500)]
Enable still more tests for generic filesystems

Make the following tests _supported_fs generic:

088 - test out CAP_DAC_OVERRIDE and CAP_DAC_SEARCH code
089 - Emulate the way Linux mount manipulates /etc/mtab
113 - aio-stress (explicitly mark as generic)
126 - tests various file permission options
129 - looptests

These all pass on ext3, ext4, btrfs, and gfs2 as well
as xfs.

Also remove "generic" group from "groups," which was
accidentally added.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>