Commit Graph

1168 Commits

Author SHA1 Message Date
Eric Sandeen 7ff755f651 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>
2010-02-19 09:32:54 -06:00
Christoph Hellwig c8eedb0fe9 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>
2010-02-15 10:01:21 +01:00
Christoph Hellwig 70d277327e 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>
2010-02-15 10:00:46 +01:00
Alex Elder 90eed13c43 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>
2010-02-13 09:59:49 -06:00
Alex Elder caab36f192 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>
2010-02-12 14:47:18 -06:00
Eric Sandeen 2e57a3e0d7 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>
2010-02-09 16:05:51 -06:00
Eric Sandeen 917658170c 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>
2010-02-09 11:59:23 -06:00
Eric Sandeen 1728089cc9 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>
2010-02-05 11:04:10 -06:00
Eric Sandeen 45768396f0 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>
2010-02-05 11:03:37 -06:00
Eric Sandeen e7c87cd480 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>
2010-02-05 11:03:01 -06:00
Eric Sandeen 8a5dcff7ca 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>
2010-02-03 10:43:53 -06:00
Eric Sandeen 640ecede93 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>
2010-02-03 08:35:24 -06:00
Eric Sandeen 73fee68110 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>
2010-02-02 17:23:58 -06:00
Christoph Hellwig 7a513fceb7 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>
2010-01-27 21:36:28 +01:00
Dave Chinner 76f1b870d9 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>
2010-01-26 14:22:35 +11:00
Dave Chinner 82e1e14dba 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>
2010-01-26 14:21:47 +11:00
Dave Chinner 31792fea50 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>
2010-01-26 14:26:42 +11:00
Christoph Hellwig a515b1b7b2 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>
2010-01-21 17:20:23 -06:00
Christoph Hellwig 5d0c6202eb 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>
2010-01-21 18:32:36 +01:00
Christoph Hellwig 43b228a5be xfstests: fix format string warnings in locktest.c
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2010-01-21 18:31:50 +01:00
Dave Chinner 76d3f120e2 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>
2010-01-21 08:54:38 +11:00
Dave Chinner a593b5a8fd xfstests: don't redefine _GNU_SOURCE in aio tests
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-21 08:54:31 +11:00
Dave Chinner e941cbe9e9 xfstests: fix printf warnings in locktest.c
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-21 08:54:23 +11:00
Dave Chinner 256a973395 xfstests: fix printf format warnings in looptest.c
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-01-21 08:54:16 +11:00
Dave Chinner 346eb6d640 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>
2010-01-21 08:54:08 +11:00