xfstests-dev.git
13 years agoxfstests: randholes: hide some Irix/Linux differences more tidily
Alex Elder [Thu, 14 Oct 2010 14:50:19 +0000 (14:50 +0000)]
xfstests: randholes: hide some Irix/Linux differences more tidily

Define a macro "xfscntl()" that effectively hides the differences
between the Linux xfsctl() and Irix fcntl() kernel interfaces.

Signed-off-by: Alex Elder <aelder@sgi.com>
Acked-by: Dave Chinner <david@fromorbit.com>
13 years agoxfstests: randholes: rearrange fns and drop their declarations
Alex Elder [Thu, 14 Oct 2010 14:50:08 +0000 (14:50 +0000)]
xfstests: randholes: rearrange fns and drop their declarations

Rearrange the functions in the file so they no longer need to be
declared at the top.  (This change involves only wholesale moves
of these blocks of code.)

Signed-off-by: Alex Elder <aelder@sgi.com>
Acked-by: Dave Chinner <david@fromorbit.com>
13 years agoxfstests: randholes: document options a bit more
Alex Elder [Thu, 14 Oct 2010 14:50:00 +0000 (14:50 +0000)]
xfstests: randholes: document options a bit more

Reformat the usage message and provide a little more
information about default values and units for options
for the "randholes" command.

Signed-off-by: Alex Elder <aelder@sgi.com>
Acked-by: Dave Chinner <david@fromorbit.com>
13 years agoxfstests: randholes: only allocate write buffer when needed
Alex Elder [Thu, 14 Oct 2010 14:49:52 +0000 (14:49 +0000)]
xfstests: randholes: only allocate write buffer when needed

If nothing is being written (i.e., in "test" mode), there's no need
for "randholes" to allocate a write buffer.  But to do this we make
this series of changes:
- When "very" verbose (> 1), there's no point in printing the values
  that have just been written to the file.  They are just the file
  offset, and the buffer will not have changed between initializing
  those values and writing it out.
- If we don't print the values at those offsets, then there's no
  need to fill them in at all when we're in test mode.
- Now we only use the write buffer if we're not in test mode,
  so we can skip the allocation.

Signed-off-by: Alex Elder <aelder@sgi.com>
Acked-by: Dave Chinner <david@fromorbit.com>
13 years agoxfstests: randholes: Fix two bugs
Alex Elder [Thu, 14 Oct 2010 14:49:43 +0000 (14:49 +0000)]
xfstests: randholes: Fix two bugs

This patch fixes two bugs in the "randholes" test program.

First, it is possible for findblock() to return -1 if the random
block number it picks is at or above the highest in-range block
that's already been selected.  But this case isn't checked and
the value is blindly used thereafter as if it were valid.  Just
exit if this ever occurs.

Second, when the "alloconly" option is is set, blocks are
preallocated in the target file rather than actually writing them.
But unlike when the blocks are written and subsequently read, the
preallocated blocks are *not* offset by the fileoffset parameter.

I'm pretty sure nobody every noticed this because the program itself
doesn't do any verification when blocks are only preallocated.  But
it's an inconsistency and I think it ought to be fixed.

Signed-off-by: Alex Elder <aelder@sgi.com>
Acked-by: Dave Chinner <david@fromorbit.com>
13 years agoxfstests: Fix some file permission.
Alain Renaud [Thu, 7 Oct 2010 22:22:55 +0000 (17:22 -0500)]
xfstests: Fix some file permission.

I notice that some of the test script do not have execute
permission. To be consistent I changed the permissions to be 755.
Can someone verify that this is valid.

Thanks.

Signed-off-by: Alain Renaud <arenaud@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoDon't depend on mkfs.xfs output in some tests
Arkadiusz Miśkiewicz [Sat, 2 Oct 2010 07:45:19 +0000 (07:45 +0000)]
Don't depend on mkfs.xfs output in some tests

Tests 136 and 206 rely on mkfs.xfs output.

136 test was currently broken with hardcoded mkfs.xfs output (that
contained for example meta-data=/dev/sda8). Drop that part from
output.

Ignore projid32bit output existence for test 206.

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfstests: make 223 use more compatible indirection operator
Alain Renaud [Fri, 1 Oct 2010 13:09:33 +0000 (13:09 +0000)]
xfstests: make 223 use more compatible indirection operator

Hello all,

I notice while running xfstests on SLES machine that the test 223 fail
because of syntax error.

# bash 223
QA output created by 223
223: line 66: syntax error near unexpected token `>'
223: line 66: `    _scratch_mkfs_geom $SUNIT_BYTES 4 $BLOCKSIZE&>>  $seq.full'

The error is due to the use of the '&>>' operator for redirection
that does not work  on older bash version(3.2.x).  Note that this
operator only seem to work with bash version 4.X+

This patch simply replace the operator with '>>  $seq.full 2>&1'
which does the same thing.

Signed-off-by: Alain Renaud <arenaud@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfstests: test 244 to test quota project id setting overflow
Arkadiusz Mi?kiewicz [Sun, 26 Sep 2010 06:10:56 +0000 (06:10 +0000)]
xfstests: test 244 to test quota project id setting overflow

Test 3 quota project setting id conditions:
- set 16bit project quota id -> should succeed
- set 32bit project quota id -> should succeed (with projid32bit
  patch applied; fail otherwise)
- over 32bit project quota id -> should always fail

Updated by <aelder@sgi.com>:
- Shortened some long lines, including failure output

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfstests: fix 108 and enable it by default
Christoph Hellwig [Fri, 1 Oct 2010 04:04:33 +0000 (06:04 +0200)]
xfstests: fix 108 and enable it by default

Apply the prjquota check to the scratch device so that it doesn't fail,
and add the test to the auto and quick groups now that it works.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoxfstests: Use $MKFS_OPTIONS in _scratch_mkfs_*()
Lukas Czerner [Wed, 29 Sep 2010 16:23:04 +0000 (11:23 -0500)]
xfstests: Use $MKFS_OPTIONS in _scratch_mkfs_*()

Pass MKFS_OPTIONS to mkfs.$FSTYP in _scratch_mkfs_sized().
Preserve user defined MKFS_OPTIONS in _scratch_mkfs_geom().

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redaht.com>
13 years agoxfstests 224: Use $SCRATCH_MNT variable
Lukas Czerner [Wed, 29 Sep 2010 16:21:21 +0000 (11:21 -0500)]
xfstests 224: Use $SCRATCH_MNT variable

Use $SCRATCH_MNT variable instead of hard-coded path (/mnt/scratch) in
test 224.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
13 years agoFix project quota checks
Arkadiusz Miśkiewicz [Thu, 9 Sep 2010 17:47:35 +0000 (19:47 +0200)]
Fix project quota checks

Project quota check in few tests should check SCRATCH_DEV and not
TEST_DEV. Fix that by making possible to pass device to be checked to
_require_prjquota().

Due to the problem tests didn't run with "Installed kernel does not
support project quotas" error.

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agoDon't hardcode paths to many binaries.
Arkadiusz Miśkiewicz [Thu, 9 Sep 2010 17:02:17 +0000 (19:02 +0200)]
Don't hardcode paths to many binaries.

Stop hardcoding paths to getfattr, setfattr, attr, quota, xfs_quota,
killall, indent and xfs_copy binaries.

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
- new
Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests 243: Test to ensure that the EOFBLOCK_FL gets set/unset correctly.
Akshay Lal [Wed, 8 Sep 2010 18:51:33 +0000 (13:51 -0500)]
xfstests 243: Test to ensure that the EOFBLOCK_FL gets set/unset correctly.

As found by Theodore Ts'o:
If a 128K file is falloc'ed using the KEEP_SIZE flag, and then
write exactly 128K, the EOFBLOCK_FL doesn't get cleared correctly.
This is bad since it forces e2fsck to complain about that inode.
If you have a large number of inodes that are written with fallocate
using KEEP_SIZE, and then fill them up to their expected size,
e2fsck will potentially complain about a _huge_ number of inodes.
This would also cause a huge increase in the time taken by e2fsck
to complete its check.

Test scenarios covered:
1. Fallocating X bytes and writing Y (Y<X) (buffered and direct io)
2. Fallocating X bytes and writing Y (Y=X) (buffered and direct io)
3. Fallocating X bytes and writing Y (Y>X) (buffered and direct io)

These test cases exercise the normal and edge case conditions using
falloc (and KEEP_SIZE).

Ref: http://thread.gmane.org/gmane.comp.file-systems.ext4/20682

Signed-off-by: Akshay Lal <alal@google.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
13 years agoxfstests: update README file to document some recent changes
Alex Elder [Mon, 2 Aug 2010 17:51:00 +0000 (17:51 +0000)]
xfstests: update README file to document some recent changes

Update the README file to document the new _cat_passwd and
_cat_group functions, and to recommend passing "-n" to
getfacl(1) so it produces numeric output.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests 241: Add missing golden output
Eric Sandeen [Mon, 30 Aug 2010 20:14:19 +0000 (15:14 -0500)]
xfstests 241: Add missing golden output

Dave reminded me of this in his review and then I forgot to
add it.  :(  But I'm taking his comment of it missing as a review
of this fix....

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
13 years agoxfstests: Show duration of current test
Lukas Czerner [Thu, 8 Jul 2010 15:23:52 +0000 (15:23 +0000)]
xfstests: Show duration of current test

It may be useful to compare both times, last and current, in the
xfstests output.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoxfstests: add a test for XFS_IOC_ZERO_RANGE
Dave Chinner [Mon, 23 Aug 2010 13:10:40 +0000 (23:10 +1000)]
xfstests: add a test for XFS_IOC_ZERO_RANGE

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests 228: suppress core dump message
Eric Sandeen [Fri, 20 Aug 2010 19:27:07 +0000 (14:27 -0500)]
xfstests 228: suppress core dump message

When running 228 with abrt on in rhel6, I was getting different
output due to a (core dumped) message on SIGXFSZ.  For some reason
I wasn't able to use sed to filter it, and just ulimit -c 0 didn't
suppress it either.

abrt sets the core pattern to:

"|/usr/libexec/abrt-hook-ccpp /var/spool/abrt %p %s %u %c""

which apparently allows core dumps even if ulimit -c is 0, due
to the pipe.

Temporarily changing the kernel's core pattern to just plain "core"
and setting ulimit -c to 0 does suppress it.  These are reset to
original values after the test is run.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests 241: run parallel dbench
Eric Sandeen [Fri, 20 Aug 2010 19:15:50 +0000 (14:15 -0500)]
xfstests 241: run parallel dbench

ext4 was corrupting inode table bitmaps due to a mishmash of
atomic & nonatomic bitops.  This got broken twice and fixed
twice; let's add a test.

On a 4-way box this reliably ends up with a corrupted filesystem
if we get it wrong (upstream as of 2.6.35 at least is fine again)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <david@fromorbit.com>
13 years agoxfstests: fix NIS detection damage
Dave Chinner [Fri, 13 Aug 2010 05:45:24 +0000 (15:45 +1000)]
xfstests: fix NIS detection damage

NIS detection wasn't tested on machines without NIS enabled, so many tests are
failing on non-NIS machines. the _yp_active function has no specific return
value so always evaluates as 0 (active) and the "_cat_passwd" function is
called from within an awk script which is not valid as the shell may run with a
sanitised environment. Hence the functions do not need specific export calls,
either, as unsanitised subshells will automatically inherit the parent's
environment.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: fix depend targets
Alex Elder [Fri, 30 Jul 2010 21:49:48 +0000 (21:49 +0000)]
xfstests: fix depend targets

There's no need to re-make the dependency files all the time.  Make
it so the "depend" target rebuilds the ".dep" file only if necessary.
Also change the name of the dependency file created for "ltdepend"
to be ".ltdep".

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
13 years agoxfstests: have getfacl(1) report numeric id's
Alex Elder [Fri, 30 Jul 2010 21:54:23 +0000 (21:54 +0000)]
xfstests: have getfacl(1) report numeric id's

This patch arranges for calls to getfacl(1) to be given the "-n"
flag, which requests that user and group id's be listed numerically
rather than using names.  The affected test output files are also
updated to indicate the effect of the change.

This eliminates some spurious output differences I was seeing, due
to the presence of NIS in my test environment.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: include NIS databases
Alex Elder [Fri, 30 Jul 2010 21:52:39 +0000 (21:52 +0000)]
xfstests: include NIS databases

If NIS is active on a test target system, additional password and
group file information is available via their respective databases
in NIS.  Currently, some tests assume that /etc/passwd and /etc/group
are the only places to find this information.

This patch causes both the local database and the NIS database (if
one is likely to be present) to be consulted for needed information.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests 240: test non-aligned AIO hole-filling
Eric Sandeen [Fri, 23 Jul 2010 16:18:59 +0000 (11:18 -0500)]
xfstests 240: test non-aligned AIO hole-filling

This replicates file corruption we've seen with qemu-kvm when
we use if=virtio,cache=none,aio=native for IO to a sparse
ext4- or xfs-hosted file, and the partitions/filesystems
within that file image are not block-aligned.  (think sector
63 here...)  This results in AIO IOs not aligned to the
filesystem blocks.

This test modifies aiodio_sparse2.c to add an option to start
the file IO at an offset.

When we do 4k writes to a 16k file in 2 threads, starting
at offset 512, we get 0s interspersed in the file where they
should not be:

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  01 01 01 01 01 01 01 01  01 01 01 01 01 01 01 01  |................|
*
00001000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001200  01 01 01 01 01 01 01 01  01 01 01 01 01 01 01 01  |................|
....

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
13 years agoAdd test for correct $SCRATCH_MNT into _require_scratch
Jan Kara [Wed, 21 Jul 2010 16:50:52 +0000 (18:50 +0200)]
Add test for correct $SCRATCH_MNT into _require_scratch

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agoProvide generic function for checking quota usage
Jan Kara [Wed, 21 Jul 2010 16:50:51 +0000 (18:50 +0200)]
Provide generic function for checking quota usage

Provide generic function _check_quota_usage for checking whether quota usage
matches the space used and use it in proper tests.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: test the aio unwrittent extent conversion race
Christoph Hellwig [Wed, 14 Jul 2010 02:38:58 +0000 (04:38 +0200)]
xfstests: test the aio unwrittent extent conversion race

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
13 years agoxfsqa: test 214 leaves files around that cause 236 to fail
Dave Chinner [Thu, 24 Jun 2010 22:25:56 +0000 (08:25 +1000)]
xfsqa: test 214 leaves files around that cause 236 to fail

Test 214 and 236 use the same file names for test files in the TEST
filesystem and don't check/create clean initial test state. Hence if
you run 214 then 236, 236 will fail with:

+link: cannot create link `/mnt/test/ouch2' to `/mnt/test/ouch': File exists
+ctime: 1277076527 -> 1277076527
+Fatal error: ctime not updated after link

Ensure that both tests clean up after themselves properly and also
ensure a clean state before they start.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfsqa: test open_by_handle() on unlinked and freed inode clusters
Dave Chinner [Thu, 24 Jun 2010 22:26:25 +0000 (08:26 +1000)]
xfsqa: test open_by_handle() on unlinked and freed inode clusters

When Christoph and I were discussing bulkstat coherency on IRC, we
realised that inode lookup from bulkstat was not actually looking up
the inode allocation btree in xfs_imap() before reading the inode
buffer from disk in xfs_iread(). Bulkstat uses the same lookup
mechanism as handle validation to avoid shutting down the filesystem
if inode numbers that point to non-inode buffers (i.e. invalid) are
passed in the handle.

The problem with this is that when we delete inodes from disk and we
remove the inode chunk (i.e. deallocate inodes) we mark both the
inodes in memory and the cluster buffer as stale, thereby preventing
it from being written back to disk. The result of this is that some
number of inodes remain on disk looking like allocated, in use
inodes (i.e.  di_mode is not zero).

Hence if we get a cold cache lookup from a stale handle that
references such an inode, we can read the inode off disk even though
it has been deleted because we don't check if the inode is allocated
or not.  If the inode chunk has not been overwritten, then the inode
read will succeed and the handle-to-dentry conversion will not error
out like it is supposed to. The result is that stale NFS filehandles
and open_by_handle() will succeed incorrectly on unlinked files for
cold cache lookups.

This is a bug that has been present ever since the inode chunk
deletion code was implemented. This test exercises the problem and
documents the hoops you have to jump through to reproduce it.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: add check for setfacl by non-owner
Shi Weihua [Thu, 27 May 2010 19:16:43 +0000 (21:16 +0200)]
xfstests: add check for setfacl by non-owner

Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: check for ctime updates on link(2)
Shi Weihua [Thu, 27 May 2010 19:16:29 +0000 (21:16 +0200)]
xfstests: check for ctime updates on link(2)

Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agoMerge branch 'quota-tests' of git://git.kernel.org/pub/scm/linux/kernel/git/jack...
Christoph Hellwig [Thu, 27 May 2010 15:56:37 +0000 (17:56 +0200)]
Merge branch 'quota-tests' of git://git./linux/kernel/git/jack/xfstests-dev/

13 years agoMake test 229 XFS specific
Jan Kara [Tue, 25 May 2010 16:25:53 +0000 (18:25 +0200)]
Make test 229 XFS specific

Only XFS supports directory 'extsize' feature.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoAdd test for quota accounting after remount read only
Jan Kara [Mon, 24 May 2010 10:04:56 +0000 (12:04 +0200)]
Add test for quota accounting after remount read only

Check that quota accounting works after remounting read-only and
then back read-write.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoAdd test of quota limit and info setting
Jan Kara [Wed, 19 May 2010 13:12:01 +0000 (15:12 +0200)]
Add test of quota limit and info setting

Add test stressing addition and removal of quota structures and setting
of quota grace time.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoAdd quota accounting test when fsstress is run and quota limits are set low
Jan Kara [Wed, 19 May 2010 11:00:36 +0000 (13:00 +0200)]
Add quota accounting test when fsstress is run and quota limits are set low

Test various error recovery paths whether they properly handle EDQUOT failures.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoAdd quota test with fsstress
Jan Kara [Tue, 18 May 2010 23:22:13 +0000 (01:22 +0200)]
Add quota test with fsstress

Run fsstress and verify that quota accounting is correct after it finishes.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoAdd test of quota accounting using fsx
Jan Kara [Tue, 18 May 2010 23:00:21 +0000 (01:00 +0200)]
Add test of quota accounting using fsx

Run fsx (and also several fsx threads in parallel) and verify that
quota accounting is correct after they finish.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoTest basic quota enforcement
Jan Kara [Tue, 18 May 2010 21:26:57 +0000 (23:26 +0200)]
Test basic quota enforcement

Add a test which checks whether basic quota enforcement works.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoxfstests: 226: have xfs_io use bigger buffers
Alex Elder [Wed, 19 May 2010 22:44:14 +0000 (22:44 +0000)]
xfstests: 226: have xfs_io use bigger buffers

By default xfs_io uses a buffer size of 4096 bytes.  On test 226,
the result is that the test runs much slower (at least an order
of magnitude) than it needs to.

Add a flag to the "pwrite" command sent to xfs_io so it uses
larger buffers, thereby speeding things up considerably.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoFix fallocate() test
Jan Kara [Mon, 24 May 2010 09:46:44 +0000 (11:46 +0200)]
Fix fallocate() test

The test for fallocate was broken because it used $TEST_DIR/$tmp.io. Because
$tmp is usually something like /tmp/1234 or /mnt/1234 the file cannot be
created and xfs_io fails regardless of existance of fallocate support. Moreover
the subsequent message parsing decides that fallocate is actually supported
because it does not expect this message.

Fix the test to not use $tmp.

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoFix test whether kernel supports quotas
Jan Kara [Wed, 19 May 2010 09:25:52 +0000 (11:25 +0200)]
Fix test whether kernel supports quotas

For all 2.6 kernels presence of quota support in kernel can be detected by
checking /proc/sys/fs/quota. This is actually more reliable than trying to
mount a filesystem with quota options (for example because SCRATCH_DEV does
not have to contain a filesystem type we are going to test).

Signed-off-by: Jan Kara <jack@suse.cz>
13 years agoxfstests: test extent size hints
Christoph Hellwig [Mon, 10 May 2010 17:39:04 +0000 (19:39 +0200)]
xfstests: test extent size hints

This is an adapted version of the reproduced in OSS BZ #874, which
shows file corruption when using the extent size hint.

Signed-off-by: Geoffrey Wehrman <gwehrman@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: honor comments in the test group file
Alex Elder [Thu, 6 May 2010 17:26:07 +0000 (17:26 +0000)]
xfstests: honor comments in the test group file

There are some spots in the "group" file where test numbers have
groups listed after a '#' character, clearly intending for those
groups to be commented out.  But the way the group list gets
generated that commenting doesn't work, and in fact these tests
explicitly *are* included in such commented-out groups.

This patch fixes that, stripping out all comments (which start
with a '#' character and end with a newline) from the file before
building the set of test numbers for a group.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests 228: New testcase to check if fallocate respects RLIMIT_FSIZE
Amit Arora [Wed, 5 May 2010 19:15:08 +0000 (14:15 -0500)]
xfstests 228: New testcase to check if fallocate respects RLIMIT_FSIZE

Add a new testcase to the xfstests suite to check if fallocate respects
the limit imposed by RLIMIT_FSIZE (can be set by "ulimit -f XXX") or
not, on a particular filesystem.

Signed-off-by: Amit Arora <aarora@in.ibm.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoxfstests: Add query fiemap count test.
Tao Ma [Tue, 4 May 2010 06:01:00 +0000 (16:01 +1000)]
xfstests: Add query fiemap count test.

According to Documentation/filesystems/fiemap.txt, If fm_extent_count
is zero, then the fm_extents[] array is ignored (no extents will be
returned), and the fm_mapped_extents count will hold the number of
extents needed.

This is broken by commit 97db39a1f6f69e906e98118392400de5217aa33a.
So add this test case in fiemap tester to avoid future regression.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Reviewed-by: Dave Chinner <david@fromorbit.com>
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>