Dave Chinner [Tue, 15 Nov 2011 20:56:37 +0000 (07:56 +1100)]
xfstests: detect gdbm library correctly
Debian unstable has move the location of the gdbm libraries as part
of it's multi-arch conversion. The libraries are now only found by
the configured library search path in /etc/ld.conf.d, so change the
autoconf macros to test and find the libraries by link tests rather
than hard coding library paths when a header is found.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
WuBo [Tue, 8 Nov 2011 03:41:45 +0000 (11:41 +0800)]
275: add a write and reserve test
This test is for write-posix test. If writing a file when the disk is almost
full, the posix wants the call to write as much as possible but not none.
quote the POSIX:
If a write() requests that more bytes be written than there is room for
(for example, [XSI] [Option Start] the process' file size limit or
[Option End] the physical end of a medium), only as many bytes as there
is room for shall be written. For example, suppose there is space for 20
bytes more in a file before reaching a limit. A write of 512 bytes will
return 20. The next write of a non-zero number of bytes would give a
failure return (except as noted below).
Signed-off-by: Wu Bo <Wu.Bo@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
WuBo [Tue, 8 Nov 2011 03:41:08 +0000 (11:41 +0800)]
274: add a prealloc and reserve test
This test is for preallocation test. If the disk is full, just with a prealloc
file has some free space that prealloc early. We need to check whether the write
to the free space is success or not.
Signed-off-by: Wu Bo <Wu.Bo@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Eryu Guan [Fri, 4 Nov 2011 02:38:03 +0000 (10:38 +0800)]
083 make variable filesize as size in bytes
The first argument of _scratch_mkfs_sized() should be file system size
in bytes, so '100m' is not a valid number, and the 'expr' expression in
_scratch_mkfs_sized() complains 'non-numeric argument' about it.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dave Chinner [Thu, 10 Nov 2011 00:08:18 +0000 (11:08 +1100)]
205: fix logging
Make the logging of operations in test 205 to the 205.full file work
correctly. This prevents the overwrite of mkfs status, and leaves
the 205.full file around for later analysis even on successful test
runs.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
WuBo [Tue, 8 Nov 2011 03:40:38 +0000 (11:40 +0800)]
273: add a copy and reserve test
This test is a stress test. It creates a set of threads for coping small files
into disk. I use a 2G disk for test, the ENOSPC arises usually but the disk is
not full under kenerl 3.0 with intel64.
Signed-off-by: Wu Bo <Wu.Bo@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Mon, 7 Nov 2011 21:03:52 +0000 (15:03 -0600)]
022: ignore fsstress file count
The recently added fsstress operations result in a different
number of directories and files being created for xfsdump test
022, which causes the test to fail since the expected xfsrestore
output records these numbers. Filter out the numbers to prevent
this from breaking in the future.
Also increase the number of fsstress operations used to populate
the filesystem so that we get roughly the same number of
directories and files as we used to for this test.
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Mon, 7 Nov 2011 17:22:16 +0000 (11:22 -0600)]
add 059 and 060 to test multi-stream xfsdump
Implement the multi-stream placeholder tests 059 and 060. The comments
imply that these tests existed on IRIX, but I was unable to find them.
Test 059 does a simple 4-way dump and restore. Test 060 does a 4-way
dump, then restores each dump file individually (in a cumulative
fashion).
The tests are skipped if the installed xfsdump does not support
multi-stream output.
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Mon, 7 Nov 2011 17:50:53 +0000 (11:50 -0600)]
fix permissions on non-executable tests
Tests that are not executable are made executable when they are
run, causing git to report them as modified. Fix this by
changing non-executable tests to have permissions of 0755.
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Tue, 8 Nov 2011 08:41:55 +0000 (12:41 +0400)]
remove duplicate umount $scratch_dev in various tests
_require_scratch unmounts the SCRATCH_DEV. So it is not necessery
to do it explicitly at the first time.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Tue, 8 Nov 2011 08:41:54 +0000 (12:41 +0400)]
260: fix dd arguments
dd should not have count argument because it suposed to work untill ENOSPC.
Also it is reasonable to log dd's output, do that for both 269'th and 270'th
tests
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Tue, 8 Nov 2011 08:41:53 +0000 (12:41 +0400)]
fsstress: fix argument typo
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 10 Nov 2011 11:15:06 +0000 (11:15 +0000)]
270: check for setcap availability
It wants to grant CAP_CHOWN to fsstress, without this capability
chown(2) will fail due to EPERM. Since chown(2) is one of the most
error prone places of quota accounting this makes 270'th
test almost useless, so it is better to simply skip it.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:53 +0000 (21:55 +0400)]
xfstress: Test data journaling flag switch for a single file
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:52 +0000 (21:55 +0400)]
xfstress: add regression testcase for
d583fb87a3ff0
Should be fixed by following patch http://patchwork.ozlabs.org/patch/120883/
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:51 +0000 (21:55 +0400)]
xfstests: add a new quota test that runs fsstress under ENOSPC conditions
- Same as 264 but with quota enabled.
- IO performed from $qa_user user
- fsstress granted with CAP_CHOWN capability.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:50 +0000 (21:55 +0400)]
xfstests: add a new test that runs fsstress under ENOSPC conditions
During stress testing we want to cover as much code paths as possible
fsstress is very good for this purpose. But it has expandable nature
(disk usage almost continually grow). So once it goes in no ENOSPC
condition it will be where till the end. But by running 'dd' writers
in parallel we can regularly trigger ENOSPC but only for a limited
periods of time because each time it opens the same file with O_TRUNC.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:49 +0000 (21:55 +0400)]
xfstests: add fiemap operation to fsstress
Related bug: http://patchwork.ozlabs.org/patch/118863
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:48 +0000 (21:55 +0400)]
xfstests: fsstress add FS_IOC_{SET,GET}FLAGS operations v2
Add two new operations:
- getattr: ioctl(fd, FS_IOC_GETFLAGS, &fl)
- setattr: ioctl(fd, FS_IOC_SETFLAGS, &random_flags)
Attribute mask may be passed via -M opt, by default is (~0).
By default FS_IOC_SETFLAGS has zero probability because
it may produce inodes with APPEND or IMMUTABLE flags which
are not deletable by default. Let's assumes that one who
enable it knows how to delete such inodes.
For example like follows:
find $TEST_PATH -exec chattr -i -a {} \;
rm -rf $TEST_PATH
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:47 +0000 (21:55 +0400)]
xfstests: add fallocate support to fsstress
Add tests for fallocate(2) syscall
- fallocate: reserve the disk space
- punch: de-allocates the disk space
Since FALLOC_FL_PUNCH_HOLE is relatively new it's value defined
explicitly if not yet defined. Later we may clear that define.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:46 +0000 (21:55 +0400)]
xfstests: freeze fsstress options for 117'th
This is regression tescase for explicit combination of seed+fs_opts.
Let's hardcode all options to prevent interactions with fsstress
changes in future.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Thu, 3 Nov 2011 17:55:45 +0000 (21:55 +0400)]
xfstests: fsstress add command line style output for show_opts
Once some combination of seed+fs_ops result in regression it is
reasonable to document that combination. It is usefull to dump
that configuration in command line style. Later this line may be
simply hardcoded in to regression test.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Tue, 1 Nov 2011 19:53:07 +0000 (14:53 -0500)]
xfstests: refactor dump test argument parsing
The dump and restore helper functions all call the same _parse_args()
function. xfsdump and xfsrestore have some common options, but others
have different meanings/syntaxes or only exist in one program or the
other. Split _parse_args() into dump and restore variants.
Further, a test cannot pass most options to xfsrestore because many of
the parsed args are not used by the restore helper functions. Change
the helpers so that the parsed options are available (to be used in
future tests).
Also add a check for a missing --multi argument, and change a couple of
callers to be consistent and use $* instead of "$@".
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Tue, 1 Nov 2011 19:53:06 +0000 (14:53 -0500)]
xfstests: allow dump file name to be passed as arg
xfsdump tests using tapes (rather than files) can pass the tape pathname
to the dump/restore helper functions using the -f option. Change
_parse_args() so that this can be done for file-based tests as well, so
that they don't have to set the global 'dump_file' variable before doing
the dump or restore.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Tue, 1 Nov 2011 19:53:05 +0000 (14:53 -0500)]
xfstests: refactor xfsdump quota checking
Tests can enable/disable quota checking by passing -q or -Q to the
various dump and restore helper routines. But -q and -Q are valid
xfsdump/xfsrestore options, so in addition to being confusing, tests
cannot use these options. Use --check-quota and --no-check-quota
instead.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Tue, 1 Nov 2011 19:53:04 +0000 (14:53 -0500)]
xfstests: refactor cumulative restore tests
The cumulative restore tests call _do_restore_file_cum(),
which requires a dump level to be passed in the -l option
in order to determine whether the restore directory needs
to be prepared or not. -l is not a valid xfsrestore option,
so doing things this way prevents tests from passing options
to xfsrestore. It's more straightforward to have the test
call _prepare_restore_dir itself prior to starting a series
of cumulative restores.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Thu, 3 Nov 2011 10:10:21 +0000 (10:10 +0000)]
xfstests: add 267 and 268 for multiple media files
This patch adds a couple of tests for xfsdump when multiple media files
are used. 267 tests the case where a file is split across multiple media
files, and 268 tests the case where a file ends on one media file and
the next media file starts on another file. These tests use a small
media file size (xfsdump -d) so that they don't rely on having to hit
end-of-tape.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Mon, 31 Oct 2011 15:02:57 +0000 (10:02 -0500)]
xfstests: delay before dumps for incremental tests
To get reproducible results when testing incremental backups, files
contained in a backup should not have the same timestamp (at second
resolution) as the backup itself. If they do, those files will also
be included in the incremental backup, and this will likely cause
issues in the expected output of the test. This patch adds a sleep
to test 024 prior to doing the level 0 backup. The other incremental
tests already include similar delays.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Thu, 3 Nov 2011 10:10:20 +0000 (10:10 +0000)]
xfstests: add test 266 for testing xfsdump -D
Add a test for xfsdump -D, which skips unchanged directories during
an incremental backup. After doing an initial backup, a new file is
added to one directory (to verify that changed directories are
backed up) and several files are appended to. Then an incremental
backup is done with -D set. The test verifies the original and
restored filesystems match after applying the base and incremental
backups, and that the incremental restore output indicates that only
the one changed directory was backed up.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Sat, 29 Oct 2011 00:48:12 +0000 (04:48 +0400)]
xfstests: fsstress should kill children tasks before exit
It is very hard to predict runtime for fsstress. In many cases it
is useful to give test to run a reasonable time, and then kill it.
But currently there is no reliable way to kill test without leaving
running children.
This patch add sanity cleanup logic which looks follow:
- On sigterm received by parent, it resend signal to it's children
- Wait for each child to terminates
- EXTRA_SANITY: Even if parent was killed by other signal, children
will be terminated with SIGKILL to preven staled children.
So now one can simply run fsstress like this:
./fsstress -p 1000 -n999999999 -d $TEST_DIR &
PID=$!
sleep 300
kill $PID
wait $PID
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Sat, 29 Oct 2011 00:48:11 +0000 (04:48 +0400)]
xfstests: add different logging option to fsstress
Currently the only way to log fsstress's output is to redirect it's shared
stdout to pipe which is very painfull because:
1) Pipe writers are serialized via i_mutex so we waste cpu-cores power on stupid
sinchronization for loging purpose, instead of hunting real race conditions,
and bugs inside file system.
2) Usually output is corrupted due to luck of sychronization on shared stdout.
Since fsstress's children operate on independend paths, let's just open didicated
log file for each child and simply avoid useless sycnhronization.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Dmitry Monakhov [Sat, 29 Oct 2011 00:48:10 +0000 (04:48 +0400)]
xfstests: fsstress dump inode info when possible
Fsstress exec behaviour is not completely determinated in case of
low resources mode due to ENOMEM, ENOSPC, etc. In some places we
call stat(2). This information may be halpfull for future
investigations purposes. Let's dump stat info where possible.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Anand Jain [Thu, 20 Oct 2011 15:41:22 +0000 (23:41 +0800)]
_populate_fs should use OPTIND when getopts is used
Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Anand Jain [Thu, 20 Oct 2011 15:41:21 +0000 (23:41 +0800)]
265: Functional test case for the btrfs raid operations
This will verify the various raid features in btrfs and device
replacement functionality.
Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Anand Jain [Thu, 20 Oct 2011 15:41:20 +0000 (23:41 +0800)]
264: Functional test case for the btrfs snapshot
Create snapshots in various ways, modify the data around the block and
file boundaries and verify the data integrity.
Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Anand Jain [Thu, 20 Oct 2011 15:41:19 +0000 (23:41 +0800)]
Added SCRATCH_DEV_POOL to specify multiple disks for the btrfs RAID
SCRATCH_DEV takes single disk as the scratch place for testing. New
SCRATCH_DEV_POOL can used to specify multiple disks for the scratch
btrfs filesystem.
Using SCRATCH_DEV and or SCRATCH_DEV_POOL will follow the following logic.
btrfs FS OR any FS
SCRATCH_DEV_POOL is unset and SCRATCH_DEV is set
. test-case with _require_scratch_dev_pool will not run
. test-case without _require_scratch_dev_pool will run
SCRATCH_DEV_POOL is set and SCRATCH_DEV is unset
. test-case with _require_scratch_dev_pool
- runs only if FSTYP=btrfs
. test-case without _require_scratch_dev_pool will run using first
dev in the SCRATCH_DEV_POOL as a SCRATCH_DEV
- if FSTYP=btrfs it includes SCRATCH_DEV_POOL disks to the FS
- if FSTYP=non-btrfs SCRATCH_DEV_POOL is ignored
SCRATCH_DEV_POOL is set and SCRATCH_DEV is set
. reports error in the config
SCRATCH_DEV_POOL is unset and SCRATCH_DEV is unset
. no change
Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Anand Jain [Thu, 20 Oct 2011 15:41:18 +0000 (23:41 +0800)]
fill files with random data
snapshot data integrity test-case needs filesystem with random data.
Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bill Kendall [Fri, 28 Oct 2011 14:53:25 +0000 (09:53 -0500)]
xfstests: add missing binaries to .gitignore
A clean checkout of xfstests followed by a build resulted in a long list
of untracked files. The current .gitignore ignores most binaries, but
the "dmapi" subdir was missed as were some binaries from the "src"
subdir.
Also ".libs" and ".ltdep" appear under a "dmapi" subdir, not just under
the top-level "libs" directory, so ignore those regardless of the
directory they are in.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Eryu Guan [Sun, 30 Oct 2011 02:25:55 +0000 (10:25 +0800)]
xfstests: 075 112 redirect stderr of fsx to /dev/null too
In commit
c18bf42de9d5d5fa05025754df1ff63f2147bd12 a warning message
will be printed to stderr if filesystem doesn't support fallocate(2).
The warning message will fail these tests though fsx returns SUCCESS.
FSTYP -- ext3
PLATFORM -- Linux/i686 debian-dev 3.1.0+
MKFS_OPTIONS -- /dev/sda3
MOUNT_OPTIONS -- -o acl,user_xattr /dev/sda3 /mnt/sda3
075 12s ... - output mismatch (see 075.out.bad)
--- 075.out 2011-10-28 21:35:41.
872573530 +0800
+++ 075.out.bad 2011-10-30 10:31:02.
607058029 +0800
@@ -4,6 +4,9 @@
-----------------------------------------------
fsx.0 : -d -N numops -S 0
-----------------------------------------------
+fsx: main: filesystem does not support fallocate, disabling
+: Operation not supported
So redirect stderr of fsx to /dev/null too.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Alex Elder [Fri, 14 Oct 2011 13:42:00 +0000 (08:42 -0500)]
1.1.0 release
Signed-off-by: Alex Elder <aelder@sgi.com>
Alex Elder [Thu, 13 Oct 2011 16:31:04 +0000 (16:31 +0000)]
xfstests: prepare for marking an initial versioned release
Add the release script used in the other XFS user space packages.
The version is set to 1.1.0, to differentiate it from the 1.0.0
version that was recorded in the VERSION file.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Alex Elder [Fri, 7 Oct 2011 22:41:38 +0000 (22:41 +0000)]
limit OP_PUNCH_HOLE operations to the file size
Before punching a hole in a file, TRIM_OFF_LEN() calls
TRIM_OFF_LEN() in order to make sure the offset and size
used are in a reasonable range. But currently the range
it's limited to is maxfilelen, which allows the offset
(and therefore offset + len) to be beyond EOF.
Later, do_punch_hole() ignores any request that starts beyond
EOF, so we might as well limit requests to the file size.
It appears that a hole punch request that starts within a
file but whose length extends beyond it is treated simply
as a hole punch up to EOF. So there's no harm in limiting
the end of a hole punch request to the file size either.
Therefore, use TRIM_OFF_LEN() to put both the the offset
and length of a request within the file size for hole
punch requests.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Alex Elder [Wed, 21 Sep 2011 20:17:51 +0000 (15:17 -0500)]
simplify TRIM_OFF_LEN() in "ltp/fsx.c"
A recent commit added a TRIM_OFF_LEN() macro in "ltp/fsx.c":
5843147e xfstests: fsx fallocate support is b0rked
A later commit fixed a problem with that macro:
c47d7a51 xfstests: fix modulo-by-zero error in fsx
There is an extra flag parameter in that macro that I didn't like
in either version. When looking at it the second time around I
concluded that there was no need for the flag after all.
Going back to the first commit, the code that TRIM_OFF_LEN()
replaced had one of two forms:
- For OP_READ and OP_MAP_READ:
if (file_size)
offset %= file_size;
else
offset = 0;
if (offset + size > file_size)
size = file_size - offset;
- For all other cases (except OP_TRUNCATE):
offset %= maxfilelen;
if (offset + size > maxfilelen)
size = maxfilelen - offset;
There's no harm in ensuring maxfilelen is non-zero (and doing so
is safer than what's done above). So both of the above can be
generalized this way:
if (SIZE_LIMIT)
offset %= SIZE_LIMIT;
else
offset = 0;
if (offset + size > SIZE_LIMIT)
size = SIZE_LIMIT - offset;
In other words, there is no need for the extra flag in the macro.
The following patch just does away with it. It uses the value of
the "size" parameter directly in avoiding a divide-by-zero, and in
the process avoids referencing the global "file_size" within the
macro expansion.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Dave Chinner [Wed, 12 Oct 2011 23:48:39 +0000 (23:48 +0000)]
fix 165 for different block sizes
xfs_io uses the filesystem block size as the default write buffer
size. 165 does not filter the ops counts out of the golden output,
and hnce causes failures because the ops count doesn't match for a
given sized write. Fix this by changing the filter to the generic
xfs_io no-numbers filter.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Christoph Hellwig [Tue, 11 Oct 2011 14:18:40 +0000 (14:18 +0000)]
allow 091 for non-xfs filesystems
The tests in 091 are entirely generic and pass e.g. on ext4 and jfs.
btrfs fails it, but that looks a like a btrfs-specific issue to me.
Also use _supported_os properly instead of erroring out manually on
IRIX.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Christoph Hellwig [Mon, 10 Oct 2011 18:22:16 +0000 (18:22 +0000)]
split mapped writes vs direct I/O tests from 091
This effectively reverts
xfstests: add mapped write fsx operations to 091
and adds a new test case for it. It tests something slightly
different, and regressions in existing tests due to new features
are pretty nasty in a test suite.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Christoph Hellwig [Mon, 10 Oct 2011 18:21:56 +0000 (18:21 +0000)]
fix 122 for recent xfsprogs
- filter out xfs_alloctype_t, this was an internal emum that got removed
- filter out xfs_bmbt_rec_32_t, this is a variant of the xfs_bmbt_rec_t
that had almost no users and was removed
- filter out xfs_dinode_core_t, the separate dinode core is gone, and just
checking the size of the full dinode is enough
- accept xfs_bmbt_rec_t as the new canonical name for xfs_bmbt_rec_64_t,
and replace the old name with the new one in the output stream.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Dave Chinner [Mon, 10 Oct 2011 02:14:15 +0000 (02:14 +0000)]
make 203 pass on non-default block size filesystems
The xfs_bmap output in the golden image is filesystem block size
dependent. Make all writes 64k to ensure that the allocation/hole
pattern is consistent across all supported filesystem block sizes.
Also, use the SCRATCH_DEV instead of the TEST_DEV so that we test
according to MKFS_OPTIONS rather than test on whatever setup the
TEST_DEV was created with.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Dave Chinner [Mon, 10 Oct 2011 02:14:14 +0000 (02:14 +0000)]
make 225 use SCRATCH_DEV
Use the scratch device for test 225 so that both custom mkfs and
mount options impact the test (e.g. filesystem block size). This
exposes test failures when using 512 byte block sizes, which
currently not tested unless the test device is specifically created
with a 512 byte block size.
Also clean up the file names to include the test number, and don't
remove the test files after the test has finished so that it leaves
behind a corpse that can be dissected when the test fails.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Alex Elder [Fri, 7 Oct 2011 22:42:00 +0000 (22:42 +0000)]
259: convert to use the _math() function
Make test 259 a bit more readable by using the new _math() function.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Eric Sandeen [Mon, 3 Oct 2011 16:52:33 +0000 (16:52 +0000)]
xfstests: make 258 more forgiving of timestamp rounding
Rather than testing for an exact timestamp, which could vary
due to rounding, just check that it is not positive,
which is the failure case we're looking for.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Alex Elder [Wed, 5 Oct 2011 02:06:29 +0000 (02:06 +0000)]
xfstests: 262: verify project quota values aren't doubled
This test checks the project quota values reported by the quota "df"
and "report" subcommands to ensure they match what they should be.
There was a bug (fixed by xfsprogs commit
7cb2d41b) where the values
reported were double what they should have been.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Alex Elder [Mon, 3 Oct 2011 23:01:18 +0000 (23:01 +0000)]
xfstests: 261: test failures caused by bogus mtab entries
There is code in libxcmd that sets up a table of mount points and
directories that may be subject to quota enforcement. If any entry
in the mount table (/proc/self/mounts) is inaccessible or has any
other problems, libxcmd exits.
We have encountered mtab entries that appear to be artifacts from
autoumount that, when parsed for getmntent(), return paths in the
mnt_fsname field that do not exist. Such entries tend to have the
text " (deleted)" appended to a legitimate pathname (although the
space character is expanded to \040, as documented in getmntent(3)).
The xfs_quota command supports the ability to specify an alternate
mount table file, so this test makes use of that feature to exercise
the problem. The test simply uses xfs_quota to print the current
set of paths, providing an alternate mount table file. First it
does so with a copy of the current mount table (which is assumed
OK), then an extra bogus entry (very much like what has been seen
in the wild) is appended to the mount table, and runs the xfs_quota
command again.
It does this with no mount options, as well as with user, group, and
project quota options enabled. (Given the current state of the code
however, only one of these is required.)
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Lukas Czerner [Mon, 26 Sep 2011 07:14:04 +0000 (07:14 +0000)]
260: Check proper FITRIM argument handling
This test suppose to validate that file systems are using the fitrim
arguments right. It checks that the fstrim returns EINVAl in case that
the start of the range is beyond the end of the file system, and also
that the fstrim works without an error if the length of the range is
bigger than the file system (it should be truncated to the file system
length automatically within the fitrim implementation).
This test should also catch common problem with overflow of start+len.
Some file systems (ext4,xfs) had overflow problems in the past so there
is a specific test for it (for ext4 and xfs) as well as generic test for
other file systems, but it would be nice if other fs can add their
specific checks if this problem does apply to them as well.
[Added call to _require_math. -Alex]
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Lukas Czerner [Mon, 26 Sep 2011 18:45:09 +0000 (18:45 +0000)]
commit.rc: Add helper for math operation using bc
Sometimes using bash $(()) math might not be enough due to some
limitation (big numbers), so add helper using 'bc' program. For
now the results are only in perfect numbers (as in bash) since this is
all I need for now.
This commit also adds _require_math() helper which should be called by
every test which uses _math() since it requires "bc" to be installed on
the system.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Christoph Hellwig [Mon, 26 Sep 2011 11:44:58 +0000 (11:44 +0000)]
xfstests: fix test 259
Move the assignment of testfile after the sourcing of the common.* files to
make sure TEST_DIR is already defined - without this we end up creating
the file on the root filesystem, which may not support large enough files.
Also add a sync after the mkfs.xfs invocation, as losetup -d might fail
the loop device deletion with -EBUSY otherwise.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Boris Ranto [Thu, 22 Sep 2011 08:30:29 +0000 (08:30 +0000)]
259: Test xfs fs creation with fs size close to 4 TB
mkfs.xfs failed to create xfs filesystems with 4 TB minus few bytes due
to round up error in mkfs.xfs code.
This test case is a regression test for the fs creation problem.
I've tested the test case with mkfs.xfs patch (in the form posted by
Eric Sandeen) and the test passed (and therefore the patch fixed the
issue for me).
I'm not sure whether bash guarantees at least 64-bit precision
values in its arithmetic operations. Therefore the values are
computed in advance.
Signed-off-by: Boris Ranto <branto@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Eric Sandeen [Mon, 19 Sep 2011 18:39:13 +0000 (18:39 +0000)]
258: test timestamps before the epoch
ext2/3/4 was sign-extending times before the timestamp when read
from disk on 64-bit systems. This was fixed by:
4d7bf11d649c72621ca31b8ea12b9c94af380e63
ext2/3/4: fix file date underflow on ext2 3 filesystems on 64 bit systems
Here's a generic regression test.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
GraĹľvydas Ignotas [Fri, 23 Sep 2011 15:56:43 +0000 (10:56 -0500)]
257: check getdents64() for duplicates
The test checks if no duplicate d_off values are returned and that
those values are seekable to the right inodes.
[Fixed typo "histoty" -> "history". -Alex]
Signed-off-by: GraĹľvydas Ignotas <notasas@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Lukas Czerner [Wed, 7 Sep 2011 15:48:43 +0000 (15:48 +0000)]
fstrim: Use strtoull instead of strtoul
When we are parsing input arguments we should really use stroull to get
unsigned long long numbers, since this is what we can specify on the
command line. With this fix it should parse long numbers on the 32 bit
architecture correctly.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
David Sterba [Tue, 16 Aug 2011 16:50:23 +0000 (18:50 +0200)]
xfstests: setup and run non-generic mkfs for btrfs
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Christoph Hellwig [Mon, 22 Aug 2011 14:22:56 +0000 (16:22 +0200)]
xfstests: fix loggen compile against recent xfsprogs headers
The XFS_BLI_CANCEL flag got rename to XFS_BLF_CANCEL, allow loggen compile
with both versions.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Eric Sandeen [Fri, 19 Aug 2011 14:57:12 +0000 (09:57 -0500)]
xfstests 062: Also accept "no such attribute" errors for invalid extended attributes
In older Linux kernels, requesting an extended attribute which cannot exist
failed with EPERM. In version 3.0, this was changed to ENODATA so that
programs can distinguish between missing attributes and permission problems
independent of the file type.
For example, lgetxattr("file", "user.name", NULL, 0) will now return ENODATA if
no such attribute exists even if "file" is a symbolic link.
In test 062, to make it work on kernels before and after 3.0, accept either of
the two error results from getfattr.
Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Stefan Behrens [Mon, 1 Aug 2011 10:31:20 +0000 (12:31 +0200)]
make t_immutable and 079 filesystem-agnostic
Changed the test 079 to be generic for all filesystems and to be executed
for all filesystems. In src/t_immutable.c which is compiled for Linux
only, replace the old style XFS and ext2 specific code for setting the
append-only and immutable flags by generic code that makes use of the
ioctl(FS_IOC_SETFLAGS) and ioctl(FS_IOC_GETFLAGS) and remove the check for
the specific filesystem type. FS_IOC_GETFLAGS/FS_IOC_SETFLAGS is always
used and placed in an '#ifdef FS_IOC_SETFLAGS' block in order to never fail
compilation. Without support for FS_IOC_SETFLAGS, the test completes
with _notrun.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Stefan Behrens [Mon, 1 Aug 2011 10:31:19 +0000 (12:31 +0200)]
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>
Christoph Hellwig [Tue, 2 Aug 2011 10:20:43 +0000 (12:20 +0200)]
add nfs4 support
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jim Rees <rees@umich.edu>
Christoph Hellwig [Tue, 2 Aug 2011 10:19:47 +0000 (12:19 +0200)]
add jfs support
Signed-off-by: Christoph Hellwig <hch@lst.de>
Christoph Hellwig [Tue, 26 Jul 2011 10:12:47 +0000 (12:12 +0200)]
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>
Theodore Ts'o [Thu, 21 Jul 2011 23:52:04 +0000 (19:52 -0400)]
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>
Theodore Ts'o [Thu, 21 Jul 2011 23:52:02 +0000 (19:52 -0400)]
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>
Jan Kara [Wed, 29 Jun 2011 16:04:40 +0000 (16:04 +0000)]
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>
Allison Henderson [Tue, 28 Jun 2011 14:45:01 +0000 (14:45 +0000)]
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>
Allison Henderson [Tue, 28 Jun 2011 14:45:00 +0000 (14:45 +0000)]
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>
Allison Henderson [Fri, 15 Jul 2011 03:52:13 +0000 (03:52 +0000)]
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>
Dave Chinner [Tue, 19 Jul 2011 22:43:41 +0000 (08:43 +1000)]
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>
Dave Chinner [Sun, 17 Jul 2011 01:46:56 +0000 (11:46 +1000)]
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>
Alex Elder [Wed, 13 Jul 2011 20:28:48 +0000 (20:28 +0000)]
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>
Dave Chinner [Thu, 14 Jul 2011 05:40:47 +0000 (15:40 +1000)]
xfstests: fix fsx build failure.
Fix a brown paper bag "build and test the wrong tree" bug.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Dave Chinner [Thu, 14 Jul 2011 05:27:27 +0000 (15:27 +1000)]
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>
Dave Chinner [Thu, 14 Jul 2011 05:27:16 +0000 (15:27 +1000)]
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>
Dave Chinner [Thu, 14 Jul 2011 05:27:01 +0000 (15:27 +1000)]
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>
Dave Chinner [Thu, 14 Jul 2011 04:07:58 +0000 (14:07 +1000)]
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>
Allison Henderson [Thu, 30 Jun 2011 05:24:01 +0000 (22:24 -0700)]
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>
Allison Henderson [Thu, 30 Jun 2011 05:23:58 +0000 (22:23 -0700)]
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>
Akshay Lal [Fri, 1 Jul 2011 20:52:43 +0000 (13:52 -0700)]
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>
Christoph Hellwig [Tue, 21 Jun 2011 07:49:57 +0000 (09:49 +0200)]
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>
Dave Chinner [Mon, 20 Jun 2011 23:53:17 +0000 (09:53 +1000)]
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>
David Sterba [Fri, 3 Jun 2011 13:52:42 +0000 (13:52 +0000)]
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>
Chandra Seetharaman [Mon, 13 Jun 2011 16:18:25 +0000 (16:18 +0000)]
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>
Chandra Seetharaman [Fri, 17 Jun 2011 15:17:45 +0000 (10:17 -0500)]
xfstests: Make the requirement of projid32bit explicit in test 244
Test 244 depends on projid32bit feature in mkfs.xfs. Not all versions
of xfsprogs provide that feature in mkfs.xfs.
This patch makes it an explicit requirement and avoids running the test
if the feature doesn't exist, instead of failing the test with an obscure
message.
[slightly modified by Eric Sandeen to shorten the _require name]
Signed-Off-By: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-Off-By: Eric Sandeen <sandeen@redhat.com>
Allison Henderson [Mon, 6 Jun 2011 23:33:50 +0000 (16:33 -0700)]
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>
Allison Henderson [Mon, 6 Jun 2011 23:33:37 +0000 (16:33 -0700)]
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>
Chandra Seetharaman [Thu, 16 Jun 2011 18:01:12 +0000 (20:01 +0200)]
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>
Chandra Seetharaman [Fri, 10 Jun 2011 21:03:41 +0000 (16:03 -0500)]
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>
Amir Goldstein [Fri, 3 Jun 2011 03:35:18 +0000 (22:35 -0500)]
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>
Amir Goldstein [Tue, 31 May 2011 20:25:12 +0000 (05:25 +0900)]
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>
Josef Bacik [Tue, 24 May 2011 20:26:03 +0000 (16:26 -0400)]
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>
Boris Ranto [Wed, 11 May 2011 17:02:24 +0000 (12:02 -0500)]
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>
Christoph Hellwig [Wed, 4 May 2011 14:28:32 +0000 (16:28 +0200)]
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>
Eric Sandeen [Wed, 4 May 2011 13:47:22 +0000 (08:47 -0500)]
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>