Commit Graph

1366 Commits

Author SHA1 Message Date
Allison Henderson 0c95fadc35 expand 252 with more corner case tests
This patch adds additional punch hole tests to 252
that were used to test ext4 punch hole. The _test_generic_punch
routine has been modified to accept two new flags:

-k To keep the test file between tests.
   This will test the handling of existing holes

-d To not sync the file between tests.
   This will test the handling of delayed extents

Four new corner cases have also been added to the routine:
14. data -> hole @ EOF
15. data -> hole @ 0
16. data -> cache cold ->hole
17. data -> hole in single block file

Signed-off-by: Allison Henderson <achender@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-06-17 14:14:57 +02:00
Allison Henderson abccd8eb54 add hole punching support to fsx
This patch adds punch hole tests to the fsx stress test.

Signed-off-by: Allison Henderson <achender@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-06-17 14:14:57 +02:00
Chandra Seetharaman 3c01f422e8 test 032: Run mkfs.xfs only if the prior mkfs.${fs} succeded
This test fails when mkfs of a different filesystem fails, which is not
a failure case for this specific test.

Hence, change the test to run mkfs.xfs only if the prior mkfs.${fs} on
different filesystem succeded.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-06-16 20:01:12 +02:00
Chandra Seetharaman 2cb9d21ed0 xfstests: Make ext2 requirement explicit for test 049
Test 049 depends on ext2 module being supported by the kernel.

This patch makes it a explicit, instead of failing the test with
obscure message.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2011-06-10 16:03:41 -05:00
Amir Goldstein 7c990a9b39 xfstests: add support for ext4dev FSTYP
blkid knows to identify the ext4dev FSTYP of a partition that was
formatted with mkfs.ext4dev.
quota tools and various util-linux utils are also aware of ext4dev,
so ext4dev shares the same capabilities as ext4.

Tested-by: Sergey Ivanov <sergey57@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2011-06-02 22:35:18 -05:00
Amir Goldstein ff65626abd fix hardcoded reference to /mnt/test in common.attr
When trying to run test 70, we encountered several problems.
Sergey has strace'd some of the problems to attempts to
set xattr on the wrong test dir (/mnt/test/), which appears to be
hardcoded in common.attr.

Reported-by: Sergey Ivanov <sergey57@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-06-01 05:25:12 +09:00
Josef Bacik 174e29730f xfstests: add test 254 for testing basic btrfs volume functionality
This test just runs through all of the basic btrfs commands that manipulate our
subvolume stuff.  It creates a snapshot, a subvolume, sets the subvolume as a
default, lists the volumes and deletes the snapshot.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-05-25 09:50:32 +02:00
Boris Ranto 630421f6d4 xfstests: fsx: do not print fallocate support warning in quiet mode
ltp/fsx.c tests whether the filesystem it is run on supports fallocate.
If it is not supported the fsx will print warning to stderr. This leads
to fails of tests 075, 112, 127 for the filesystems that do not support
fallocate. The tests use ltp/fsx but do not filter out stderr. Since 
ltp/fsx.c can work without fallocate support I propose to move this
message to stdout unless quiet output is not requested. Previous patch
printed the message even if -q flag was used. This patch honours the flag.

This simple patch fixes the issue for me, tested on all the mentioned tests:

Signed-off-by: Boris Ranto <branto@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2011-05-11 12:02:24 -05:00
Christoph Hellwig 0a818862bb xfstests: support post-udev device mapper nodes
Because of udevs complaining device mapper now creates /dev/dm-N as the real
device nodes, and just symlinks the /dev/mapper/ names to it.  This would be
easy if everything used the /dev/mapper clear names, but most system utilities
translate them back to the /dev/mapper/ names and thus confuse various test
cases.  Add support to _is_block_dev to read symlinks, and add documentation
on how to run xfstests on device mapper volumes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2011-05-04 16:28:32 +02:00
Eric Sandeen 7656052d6b xfstests: clean up fallocate configuration tests
When I added fallocate support to fsx I inadvertently added
a duplicate fallocate test.

Consolidate them both into one test (the link test, not the
compile test) and make all tests use "true" rather than "yes"
to be more consistent with other tests.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Alex Elder <aelder@sgi.com>
2011-05-04 08:47:22 -05:00
Tao Ma 30456902c6 xfstests: fix error discard test output in 251.out
I don't know why, but discard tests is 251 in xfs, but 251.out has
number of 248 in it, So it fails.  Change it to 251 now.

Cc: Lukas Czerner <lczerner@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Alex Elder <aelder@sgi.com>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-05-03 13:41:10 -05:00
Alex Elder c8200ef31e xfstests: 253: test the metadump functionality of xfs_db
This patch creates a test that exercises xfs_metadump, with a focus
on its obfuscation of names.  It was created to verify fixes that
avoided a hang condition when running "xfs_metadump" on a directory
containing files having particular bit patterns in their name.
Arkadiusz Miśkiewicz first reported seeing this while attempting
to create a metadump for a filesystem containing a file named
"R\323\257NE".

For now this script checks the following (using only filenames, not
attributes):
- that short names (4 characters or less) aren't obfuscated
- that long names get obfuscated
- that (long) directory names get obfuscated
- that names that are known to produce bit patterns that lead
  to invalid path components still generate obfuscated names
  (this could previously lead to a hang)
- that many names of the same length can still generate new
  obfuscated names (this could previously lead to a hang)
- that neither "lost+found" nor orphaned files stored in it ge
  obfuscated

Right now there are two sets of "ls" commands executed (one before
and one after obfuscation).  This produces repeatable results for
me on one filesystem, but on a different filesystem I expect the
inode numbers to change (and random number generation might change
the output too).  I'm interested in suggestions on how to filter
the output so the results can be verified.  If nothing else, the
test serves its purpose if I simply comment out those commands,
and will do that if there's not a better suggstion.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-05-03 13:39:29 -05:00
Alex Elder 9935bd9855 xfstests: coalesce contiguous extents in extent map output
The specific set of extent sizes allocated to a file is not always
deterministic.  In particular, sometimes a range of unwritten blocks
is covered by a single extent, while in other cases it might be
represented by multiple consecutive unwritten extents.  This can
result in spurious errors being reported in tests that check file
extent maps.

Add a filter that finds adjacent extents in what gets produced for
fiemap and bmap output and coalesces them as if all consective
extents of the same time were really just one extent.  (Note that
as implemented here this applies to all extent types, not just
unwritten extents.)

Update the golden output for test 242 to reflect the change.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-29 16:20:22 -05:00
Alex Elder bf564e0399 xfstests: make a few recently-added tests executable
By convention all of the tests in the xfstests suite have mode 0755.
A few have recently committed without the execute bit set.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-28 12:43:47 -05:00
Alex Elder 100f74846e xfstests: drop "Mount point match" from 028 and 047 golden output
Bill Kendall's latest update to xfsdump dropped a line of output
that served no real purpose.  This change updates the golden output
for the two tests that included that line of output.

Updated to filter out that line from dump output also, so old
versions of the code will still produce the same output (suggested
by Dave Chinner).

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2011-04-28 12:41:00 -05:00
Alex Elder d4ff3dd530 xfstests: eliminate warnings under dmapi/src/suite2/src
Eliminate build warnings reported on files located under
dmapi/src/suite2/src/.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-28 12:36:34 -05:00
Alex Elder 6fb34e2165 xfstests: eliminate warnings under dmapi/src/suite1/cmd (3)
Eliminate build warnings reported on files located under
dmapi/src/suite1/cmd/ (third of three).

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-28 12:36:33 -05:00
Alex Elder a2f9298d5e xfstests: eliminate warnings under dmapi/src/suite1/cmd (2)
Eliminate build warnings reported on files located under
dmapi/src/suite1/cmd/ (second of three).

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-28 12:36:31 -05:00
Alex Elder eb84ef4de8 xfstests: eliminate warnings under dmapi/src/suite1/cmd (1)
Eliminate build warnings reported on files located under
dmapi/src/suite1/cmd/ (first of three).

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-28 12:36:29 -05:00
Alex Elder 3d3751a7b3 xfstests: eliminate some warnings under dmapi/src
Eliminate build warnings reported on files located under these
subdirectories:
    dmapi/src/common/cmd/
    dmapi/src/common/lib/
    dmapi/src/sample_hsm/
    dmapi/src/simple/

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-28 12:36:28 -05:00
Josef Bacik b16ef33889 xfstests 252: add test for fallocate with hole punching
Move the major test meat of 242 into common.punch, and reuse it for
a new testcase the exercises the new fallocate implementation

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-04-20 17:34:36 +02:00
Dave Chinner 3a4b6e0192 xfsqa: reduce error output on 229
Once we get one short write, we know the test has failed. We don't
ened to keep writing and getting more short writes and spewing
thousands of errors to the console.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
2011-04-15 16:48:32 +10:00
Christoph Hellwig 9a4fb1b675 xfstests: allow deeper symlink recursion in 005
Recent kernels allow more than 40 nested symlinks, so up the limit
to still reproduce a failure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-11 11:20:37 -07:00
Eric Sandeen 188cf0a6d3 xfstests: ensure selinux xattrs don't interfere with quota tests
219 and 235 were failing on ext3 with selinux, because the extra
xattrs upped the quota usage.

Do the same trick we've used in the past to mount with an selinux
global context when doing quota tests.

Note the gross hack for remount,ro, though.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2011-04-04 13:49:19 -05:00
Eric Sandeen 4342e76708 xfstests 249: use -F option for xfs_io
Test 249 was appearing to pass on ext4, but it wasn't really
exercising the test due to lack of "-F" in the xfs_io arguments.

Without -F the files were created (oddly enough); neither pwrite
nor sendfile were executed, and the diff of the two (empty)
files passed, resulting in a passed test without testing anything.

So add the -F, capture the output, and test the result of each
xfs_io invocation.

Also, when it fails, the diff output is huge.  Make diff silent,
but describe the diff failure and exit.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-04-04 13:46:10 -05:00