Commit Graph

1342 Commits

Author SHA1 Message Date
Stefan Behrens b2b36d0a4e make more tests generic
Use _scratch_mkfs / _scratch_mkfs_sized instead of _scratch_mkfs_xfs where
possible. Execute 015, 062, 083, 117, 120 and 192 for all filesystems, these
tests used to be XFS specific.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-08-03 14:00:15 +02:00
Christoph Hellwig 7d92016617 add nfs4 support
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jim Rees <rees@umich.edu>
2011-08-02 12:20:43 +02:00
Christoph Hellwig 4a53ac1856 add jfs support
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-08-02 12:19:47 +02:00
Christoph Hellwig 81ee4b6dc9 fix fsx build with newer xfs headers
The libxfs resync brought in a new round_up macro that conflicts with the
round_up function in fsx.  Rename the latter to allow building against the
new headers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-07-26 12:12:47 +02:00
Theodore Ts'o 40a566dc89 dmapi: fix build failure if libdm is provided via -ldm
The value of $(LIBDM) may be a linker specification -ldm, and not a
file.  So it's not OK to add this to the dependency, since make will
then complain that it doesn't know how to make the target -ldm.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-07-22 16:16:18 +02:00
Theodore Ts'o 0655d09fbf configure.in: declare a requirement for at least autoconf 2.50
On Debian/Ubuntu systems, if autoconf version 2.13 is installed,
autoconf will try to automatically figure out whether autoconf 2.13 or
something more modern is required (since the autoconf maintainers,
curses be upon them, didn't bother to maintain compatibility between
autoconf 2.13 and 2.50).  Unfortunately, the hueristics aren't
perfect, and although the configure.in file looks superficially like
it will be compatible with autoconf 2.13, it isn't.  You will end up
with a number of very subtle compilation failures if you use autoconf
2.13.

So declare a requirement for autoconf 2.50 using AC_PREREQ(2.50).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-07-22 16:16:18 +02:00
Jan Kara 7f4a2e30b2 xfstests: Improve test 219 to work with different filesystems
Different filesystems account different amount of metadata in quota.
Thus it is impractical to check for a particular amount of space
occupied by a file because there is no right value. Change the test
to verify whether the amount of space is between the expected amount
of space and the expected amount +5%.  The number of files is
checked exactly as previously.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-07-20 18:22:09 -05:00
Allison Henderson b55fb0807c xfstests: Add ENOSPC Hole Punch Test
This patch adds a new test 256 that tests that a hole can be punched
even when the disk is full.  Reserved blocks should be used to allow
a punch hole to proceed even when there is not enough blocks to
further fragment the file. To test this, the file system is
fragmented by punching holes in regular intervals and filling the
file system between punches. This will eventually force the file
system to use reserved blocks to proceed with the punch hole
operation.

The work in this patch is a continuation from a previous patch set
that has been partially accepted.

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-07-20 18:22:07 -05:00
Allison Henderson 5c6a8cb5af xfstests: ENOSPC Punch Hole: Move su routines in 123 to common.rc
This patch moves the su routines in test 123 to common.rc so that
they can also be used in the new test 256

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-07-20 18:22:06 -05:00
Allison Henderson ced9681ea4 xfstests: Correct extent flag parsing for punch hole tests
The fiemap filters used in the punch hole tests parse the extent
flags in the fiemap to determine the extent type.  They are
currently parsing them as decimal values, but they should be parsing
hex values.

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-07-20 18:22:05 -05:00
Dave Chinner c47d7a51ef xfstests: fix modulo-by-zero error in fsx
The recent fsx fixes has a logic error in the offset trimming code.
If a read is done when the file size is zero, then the logic error
causes a offset % 0 opertaion to occur. This causes fsx to get a
SIGFPE and die.

This was not discovered during my testing because I was using a
random seed that didn't trip this condition. Changing the seed to
that which test 091 uses (the default of 1) causes such an operation
to occur....

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2011-07-20 08:43:41 +10:00
Dave Chinner 407191f702 xfstests: don't hard code the shell binary
Recent changes to debian unstable user space have caused the
xfstests build to break as certain shell functionality is being
assumed by libtool and friends.  The configure scripts test and
select the correct shell, but the input files ignore this and hard
code the shell to use and hence now break.

Fix this by using the shell that the configure scripts decide is the
right one to use.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
2011-07-17 11:46:56 +10:00
Alex Elder 0be5cdd635 xfstests: update test 250 and its golden output
Test 250 actually runs now that it has golden output defined.  The
output the test produces doesn't match the golden output, however.

The main reason seems to be a oversight in the test--the stderr
output of mkfs wasn't being ignored as it should be (likely for
debugging).  Remove the comment character so the stderr does get
ignored.

Doing this still leaves some other output, but since it's filtered
there's no reason to leave it out of the golden output.  So add
the expected result of filtering into the golden output file.

Finally, this test--unlike almost all of the others--specifies the
value of its "tmp" variable as a relative rather than absolute
path.  I'm sure that works in some places, but it produces errors
for me.  Follow the "tmp=/tmp/$$" convention used elsewhere.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2011-07-14 11:05:25 -05:00
Dave Chinner 5ad338be47 xfstests: fix fsx build failure.
Fix a brown paper bag "build and test the wrong tree" bug.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-07-14 15:40:47 +10:00
Dave Chinner c00bad1c4c xfstests: add mapped write fsx operations to 091
The recent busted fsx updates caused fsx to execute fsx with direct
IO and mmapped reads and writes on an XFS filesystem. The result
uncovered a direct-IO write vs mmap read bug to do with EOF
sub-block zeroing on the direct IO write.

Hence whiel we do not recommend that pepole mix DIO with mmap on the
same file, we should at least have tests that exercise it as they
often show up other problems like this.


Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
2011-07-14 15:27:27 +10:00
Dave Chinner 77c0620248 xfstests: fix brain-o in fallocate log dump
fsx segvs when dumping fallocate log entries. Fix magic string
array index parameters to be zero based rather than one based.

While touching log string related stuff, make the format consistent
with read and write operations so the log dump is easier to look at
with the human eye.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
2011-07-14 15:27:16 +10:00
Dave Chinner 5843147ef1 xfstests: fsx fallocate support is b0rked
The recent fallocate/fpunch additions to fsx have not actually be
executing fallocate/fpunch operations. The logic to select what
operation to run is broken in such a way that fsx has been executing
mapped writes and truncates instead of fallocate and fpunch
operations.

Remove all the (b0rken) smarty-pants selection logic from the test()
function. Replace it with a clearly defined set of operations for
each mode and use understandable fallback logic when various
operation types have been disabled. Then use a simple switch
statement to execute each of the different operations, removing the
tortured nesting of if/else statements that only serve to obfuscate
the code.

As a result, fsx uses fallocate/fpunch appropriately during
operations and uses/disableѕ the operations as defined on the
command line correctly.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
2011-07-14 15:27:01 +10:00
Dave Chinner c18bf42de9 xfstests: fix fsx fpunch test to actually test for fpunch
The operation flags parameter to fallocate is the second parameter,
not the last. Hence the fpunch test is actually testing for falloc
support, not fpunch. Somebody needs a brown paper bag.

Also, add a ftruncate call whenthe fpunch succeeds just in case the
file was not already zero sized. Failing to ensure we start with a
zero length file can cause read ops to fail size checks if they
occur before the file is written to be the main test loop.

While there, observe the quiet flag the same as the falloc test
does and have them both emit the warning at the same error level.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
2011-07-14 14:07:58 +10:00
Allison Henderson 75d2f82138 add generic hole punch test 255
This patch adds a new test 255 that tests fallocate punch hole,
but is for use by generic filesystems.  It is similar to 252,
but uses a weaker fiemap filter that only displays the location
of the hole, and not the extent types.

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-07-13 14:31:45 +02:00
Allison Henderson ec0d982bdc make 252 xfs only, add md5 checksums to hole punch tests
This patch modifies test 252 to run for only xfs, and also
adds an md5 checksum to each of the punch hole tests

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-07-13 14:31:43 +02:00
Akshay Lal dbbad331d3 Fix the ltp Makefile to allow for installation of all non-c (scripts) files
Current the Makefile only builds the .c files and installs
them in the $INSTALL path. However, the ltp directory contains a shell script,
which doen't get copied over (installed) when a "make install"is invoked.

This behaviour causes test 080 to fail since it requires rwtest.sh to be
present in the ltp/ directory.

Tested: Updated the Makefile and ran a static build script & test
080.

Signed-off-by: Akshay Lal <akshaylal@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-07-13 14:07:41 +02:00
Christoph Hellwig 9d9bc83dff xfstesta: update test 242 golden output
Add the golden output for the newly added tests in common.punch.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2011-06-21 09:49:57 +02:00
Dave Chinner 954c02c00b xfsqa: add mising golden output for 250
Was missed from the final commit that was checked in. Add it now.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
2011-06-21 09:53:17 +10:00
David Sterba 3f4aa99834 xfstests: fix hardcoded path in output of 254
Add filters after btrfs commands, else the test would incorrectly
appear failed.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-06-17 13:33:52 -05:00
Chandra Seetharaman c75611bca6 xfstests: limit size of created filesystem in test 202
Test 202 fails when the filesystem size is greater than 1TB with
a not so clear message.

Call mkfs with a small enough filesystem size to work even with
older versions of XFS.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-06-17 12:10:08 -05:00