Eric Sandeen [Thu, 28 May 2009 16:37:38 +0000 (11:37 -0500)]
Support "generic" filesystem type
Create a new "generic" _supported_fs type for tests
which are not really filesystem-specific. "generic"
tests do expect that acl & attr are supported though.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de>
It turns out lsqa.pl nees the test number and description first in the
file, so move the GPL boilerplates below it.
Also remove acouple of cases where we have one full copyright line + gpl
boilerplate before the description and another copyright line after
the description.
Felix Blyakher [Tue, 12 May 2009 18:24:15 +0000 (13:24 -0500)]
Add GPL license plate to SGI's test files.
Signed-off-by: Felix Blyakher <felixb@sgi.com> Reviewed-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Felix Blyakher <felixb@sgi.com>
Theodore Ts'o [Wed, 13 May 2009 20:52:42 +0000 (15:52 -0500)]
fsx: Add check for mmap last-page zero fill
Check to make sure the VM system provided 0's beyond the true end of
the file mapping (as required by mmap def in 1996 posix 1003.1)
This check was taken from the FreeBSD version of fsx.c.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Theodore Ts'o [Wed, 13 May 2009 20:52:23 +0000 (15:52 -0500)]
fsx: Replace use of bcmp() with memcmp()
The bcmp() function comes from BSD 4.3, and was deprecated in
POSIX.1-2001. It was removed entirely in POSIX.1-2008.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Theodore Ts'o [Wed, 13 May 2009 18:31:46 +0000 (13:31 -0500)]
fsx: Replace use of bzero() with memset()
The bzero() function comes from BSD 4.3, and was deprecated in
POSIX.1-2001. It was removed entirely in POSIX.1-2008.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Theodore Ts'o [Wed, 13 May 2009 18:31:46 +0000 (13:31 -0500)]
fsx: Use %ll instead of %q in printf format statements
The ISO C approved way of printing long long variables is %ll. The %q
length modifier was used in BSD 4.4 and Linux libc5, and its use is
discouraged as non-standards compliant.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Eric Sandeen [Fri, 24 Apr 2009 18:57:55 +0000 (13:57 -0500)]
xfstests: fix 130, 132 for inifinitely-fast disks
Due to the new quantum/holographic storage I'm testing, my
disks go infinitely fast, thereby breaking some filters:
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+3 KiB, 1 ops; 0.0000 sec (inf EiB/sec and inf ops/sec)
I'm no regexp expert but I think the below change will fix it.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Reviewed-by: Christoph Hellwig <hch@infradead.org>
Eric Sandeen [Mon, 20 Apr 2009 02:11:32 +0000 (21:11 -0500)]
xfstests: skip dump tests if dump utils not found
I was running xfstests on a NAS box which had no xfsdump,
and any tests which required xfsdump were failing in not-so-nice
ways:
+ xfsdump not found
038 [failed, exit status 1] - output mismatch (see 038.out.bad)
I think using _notrun is a lot better:
038 [not run] xfsdump not found
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Josef 'Jeff' Sipek" <jeffpc@josefsipek.net> Reviewed-by: Felix Blyakher <felixb@sgi.com>
Felix Blyakher [Mon, 6 Apr 2009 15:18:34 +0000 (10:18 -0500)]
xfstests: fix async io error handling in fsx
The result of async io returned in the event.res in addition
to the number of bytes read/written provides negated error
number. The broken libaio defines event.res as unsigned
while the same structure in the kernel defines it as signed.
The kernel indeed treats it as signed, and returns the
negated error number. Till libaio is fixed we provide
the signed long temp var.
Also set errno for each error condition in aio_rw, as the
caller is not aio aware and expects ret(-1)+errno by the
traditional libc convention.
Signed-off-by: Felix Blyakher <felixb@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Dave Chinner [Mon, 13 Apr 2009 13:55:41 +0000 (15:55 +0200)]
xfstests: test 205, test writing to ENOSPC
Use larger files and different writing styles to fill a 100MB filesystem
to being full. In each case we should get very close to the filesystem
being full before getting ENOSPC. This tests different types of ENOSPC
failures to test 203 and requires more changes to pass.
Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Dave Chinner [Mon, 13 Apr 2009 13:51:58 +0000 (15:51 +0200)]
xfstests: add test 204, a simple delayed allocation ENOSPC test
Using a small (100MB) filesystem and writing lots of single block files
can result in spurious ENOSPCs being reported. Reproduce this test case
so we can confirm that it gets fixed.
Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Signed-off-by: Josef 'Jeff' Sipek <jsipek@eecs.umich.edu> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Felix Blyakher <felixb@sgi.com>
xfstests: make the mode consistent for all the test scripts
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Signed-off-by: Josef 'Jeff' Sipek <jsipek@eecs.umich.edu> Signed-off-by: Christoph Hellwig <hch@lst.de>
Dave Chinner [Wed, 25 Mar 2009 19:53:36 +0000 (20:53 +0100)]
reduce the number of processes forked
One of the big cpu time consumers when running xfsqa on UML
is forking of new processes. when looping lots of times,
using 'expr' to calculate the loop counter increment means
we fork at least once every loop. using shell builtins means
that we don't fork and many tests run substantially faster.
Some tests are even runnable with this modification. e.g. 110
went from taking 4500s to run down to 9s with the loop iterators
changed to avoid forking.
Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Test that we can get all extent/hole information for files with more
than 16 extents and 15 holes which require a reallocation based on
XFS_IOC_FSGETXATTR.
Based on a testcase from Tomasz Majkowski <moosh009@gmail.com>.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Fix a couple of issues when running xfsqa with external logs:
- update the 096 golden output for the external log case
- add a new _scratch_xfs_check similar to _scratch_xfs_logprint and
_scratch_xfs_repair that take the log device into account and use it
in test 134
- use _scratch_xfs_repair in test 202 to fix it for external log
devices
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Add a new group for test to quickly verify WIP patches. I've started
it by only taking tests fro mthe auto group that take 20 seconds or less
to complete on the kvm virtual machine on my laptop. The total run
of the quick group takes about 8 minutes for me.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
I don't have a single machine where these succeed, and due to the wait
the filestreams allocator works these tests might depend on the phase
on the moon to get their expected output.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Eric Sandeen [Tue, 30 Dec 2008 22:34:17 +0000 (23:34 +0100)]
test 194, test tricky mapping/conversion around holes
Related to
http://oss.sgi.com/bugzilla/show_bug.cgi?id=801
Latest patch posted on that bug makes this testcase pass...
first 2 tests are simple buffred writ tests making sure stale
data isn't exposed, and hole-blocks aren't mapped.
2nd 2 tests are more related to the above bug, tricky testcase
uncovered by fsx on ppc64 which actually re-maps a block
which should be a hole, bringing stale data back into existence.
V2, don't use non-posix awk extensions
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de>
Eric Sandeen [Tue, 30 Dec 2008 22:33:34 +0000 (23:33 +0100)]
fix dbtest build
At least on my x86_64 RHEL5 box, if gdbm-devel is installed, then the
xfstests build fails with:
gcc dbtest.c -o dbtest -g -O2 -DDEBUG -I../include -DVERSION=\"1.0.0\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall ../lib/.libs/libtest.a
dbtest.c: In function 'InitDbmLookup':
dbtest.c:147: warning: cast from pointer to integer of different size
dbtest.c:198: warning: cast from pointer to integer of different size
/tmp/ccuekqxe.o: In function `CleanupDbmLookup':
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:304: undefined reference to `dbm_close'
/tmp/ccuekqxe.o: In function `DoDbmLookup':
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:220: undefined reference to `dbm_fetch'
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:264: undefined reference to `dbm_fetch'
/tmp/ccuekqxe.o: In function `InitDbmLookup':
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:146: undefined reference to `dbm_open'
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:179: undefined reference to `dbm_store'
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:192: undefined reference to `dbm_close'
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:197: undefined reference to `dbm_open'
collect2: ld returned 1 exit status
gmake[1]: *** [dbtest] Error 1
make: *** [default] Error 2
This patch fixes it for me, but my userspace-fu is weak; does this look ok?
Barry Naujok [Wed, 26 Nov 2008 02:43:44 +0000 (02:43 +0000)]
mkfe2fs unfortunately hasn't heard about real enterprise setups using
whole disks and needs the -F option to create a filesystem on those
without asking stupid questions that make the testcases block forever.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Merge of master-melb:xfs-cmds:32546a by kenmcd.
Barry Naujok [Thu, 20 Nov 2008 14:24:24 +0000 (14:24 +0000)]
Create a tape group for anything which expects
to dump to tape (I guess this is a superset
of "remote" and a few others). Also, remove
this from the auto group; most people won't have tapes
and -g tape is easy enough (per dchinner's suggestion).
Merge of master-melb:xfs-cmds:32513a by kenmcd.
but if we make that "\n" go away, the test still passes.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Merge of master-melb:xfs-cmds:32444a by kenmcd.
Long devicenames cause this quota output to split onto 2 lines:
# xfs_quota -c "quota -gpu -birnN 99" /mnt/scratch
/dev/mapper/testvol-test2
880 1004 1004 00 [--------] 1 10 10 00 [--------] 0 0 0 00 [--------] /mnt/scratch
but if we make that "\n" go away, the test still passes. Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Tim Shimmin [Tue, 14 Oct 2008 14:58:57 +0000 (14:58 +0000)]
test out a remount bug where ro->rw doesn't update xfs flag and thinks it is
still readonly. Test using touch.
Code provided by Christoph Hellwig. Signed-off-by: Christoph Hellwig <hch@lst.de>
Merge of master-melb:xfs-cmds:32320a by kenmcd.
test out a remount bug where ro->rw doesn't update xfs flag and thinks it is
still readonly. Test using touch.
Code provided by Christoph Hellwig.
Tim Shimmin [Fri, 15 Aug 2008 16:11:24 +0000 (16:11 +0000)]
Add a bunch of tests for remount code.
Written by Christoph and amended by Tim to do some more testing
with fstab etc.
Merge of master-melb:xfs-cmds:31909a by kenmcd.
Tims patch to fix test 122: the __arch_pack stuff is confusing it - as was the case in the past
with the "attribute packed" stuff for the efi/efd items etc..
It is confusing the parsing which works out the type names.
Merge of master-melb:xfs-cmds:31658a by kenmcd.
Tim Shimmin [Tue, 15 Jul 2008 06:17:47 +0000 (06:17 +0000)]
If test 078 fails and you try to run it again immediately, it
will execute a 'rm -f' on a directory which will fail. This should
be a rmdir....
Signed-off-by: Dave Chinner <dgc@sgi.com>
Merge of master-melb:xfs-cmds:31637a by kenmcd.
If test 078 fails and you try to run it again immediately, it
will execute a 'rm -f' on a directory which will fail. This should
be a rmdir.... Signed-off-by: Dave Chinner <dgc@sgi.com>
Donald Douwsma [Wed, 18 Jun 2008 16:09:09 +0000 (16:09 +0000)]
fix XFSQA 145 / test_hole
There are two errors I see all the time in 145:
- dm_probe_hole returns EINVAL for offsets close to the file size
- dm_probe_hole wants EAGAIN for a probe at offset 1, length 0
The first error is a consequence of how the hole puching / probing
works. It always rounds the requested offset up to the next block
size and then checks if that rounded offset still fits into the file
size. Just do the same rounding in the testcase to make sure we don't
probe invalid offsets.
The second error is very odd to me, as we never return AGAIN in the
whole dm_probe_hole path. I've just commented it out.
I've also re-enabled the E2BIG to past-EOF test that was uncommented
before because it works perfectly fine now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Merge of master-melb:xfs-cmds:31330a by kenmcd.
Donald Douwsma [Wed, 18 Jun 2008 16:08:20 +0000 (16:08 +0000)]
Fix XFSQA test 144
Two really dumb bugs:
- "foo & 0x3FFFFFFFFFFFF" doesn't cap at 1TB, but rather at more than
two magnitudes larger than that. That gets us EFBIG with typical
32bit XFS setups.
- the command array can easily overflow and thus let the test fail
Signed-off-by: Christoph Hellwig <hch@lst.de>
Merge of master-melb:xfs-cmds:31327a by kenmcd.
Barry Naujok [Thu, 29 May 2008 17:01:09 +0000 (17:01 +0000)]
mkfs.reiserfs refuses to create a filesystem on full devices without
partitions unless it's given -f in addition to the already required Y
input to confirm the fs creation, so give the argument to it.
While we're at it also write the full command line used to create the
filesystem into the log to ease future debugging.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Merge of master-melb:xfs-cmds:31250a by kenmcd.
Execute bits changed from xxx to ---
Fix up test with reiserfs
Dave Chinner [Thu, 15 May 2008 16:39:01 +0000 (16:39 +0000)]
Don't run 167 if killall is not installed
Test 167 will leave runaway fsstress processes around in case killall is
not installed and thus make all following tests fail. This patch checks
for killall beeing installed and error out otherwise.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Merge of master-melb:xfs-cmds:31171a by kenmcd.
Dave Chinner [Thu, 15 May 2008 16:38:14 +0000 (16:38 +0000)]
Fix pathname filter issue.
If the path to the file being bmap'd has a [0-9] in it,
the output filter matches it and we get golden output
failure. Be more specific on the match.
Merge of master-melb:xfs-cmds:31170a by kenmcd.
Be more specific when trying to match extent output lines.