Christian Kujau [Mon, 20 Jul 2009 09:31:39 +0000 (11:31 +0200)]
don't fail if nslookup is not found
When nslookup is not available, execution would stop. This patch moves the
check for nslookup and the _get_fqdn function into the ./new script (since
this is the only place where it's used) and we don't fail any more but try
to find out our FQDN without nslookup.
Signed-off-by: Christian Kujau <lists@nerdbynature.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
Christoph Hellwig [Tue, 7 Jul 2009 10:35:56 +0000 (12:35 +0200)]
xfstests: test c/mtime updates through mapped writes
Check that we correctly update the timestamps when writing to a file
through an mmap mapping. Currently fails for XFS due a VFS bug but
succeeds for many other filesystems.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
New test to test basic mixed fallocate + read & write,
includes a couple regression tests for bugs that ext4
hit. Uses xfs_io to generate fallocate calls, so requires
git xfsprogs and very recent glibc at this point.
Ext4 folks, this is hopefully a reasonable example of
how to add a new test. :)
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de>
Theodore Ts'o [Sat, 20 Jun 2009 17:14:14 +0000 (19:14 +0200)]
fix common.config to allow SCRATCH_DEV and SCRATCH_MNT to be optional
Commit 3ae9f2f8 purports to allow SCRATCH_DEV and SCRATCH_MNT to be
optional, but tests in common.config will cause check to exit with an
error if these environment variables are not defined. Fix this problem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Christoph Hellwig <hch@lst.de>
Theodore Ts'o [Sat, 20 Jun 2009 17:05:45 +0000 (19:05 +0200)]
fix _require_scratch test for extN, resierfs, gfs2, and btrfs
The extN, reiserfs, gfs2, and btrfs filesysytem types should use the
same check for a block device as XFS and UDF, and not the test for
NFS, which was checking for host:/foo/bar/baz when checking for a
scratch device.
Also, the NFS logic was also incorrect, in that it would allow a
zero-length SCRATCH_DEV to continue.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Felix Blyakher <felixb@sgi.com>
Theodore Ts'o [Sat, 20 Jun 2009 17:01:43 +0000 (19:01 +0200)]
skip _check_test_fs unless a test is actually run
Running _check_test_fs can take a non-trivial amount of time, and if a
test has been skipped because it doesn't work on Linux, or it doesn't
work of for ext4, it's pointless to re-run _check_test_fs. So move
the call to _check_test_fs so it is only run if a test is actually run.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Felix Blyakher <felixb@sgi.com>
Eric Sandeen [Wed, 10 Jun 2009 20:05:04 +0000 (15:05 -0500)]
Skip dump _cleanup if filesystem is not xfs
Many/most dump tests include common.dump before checking
supported fs, and this means that even if the dump tests
are skipped, the sleep & filesystem check in _cleanup
gets run, which makes it take rather a long time to
skip these tests for non-xfs filesystems.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Eric Sandeen [Tue, 9 Jun 2009 18:35:28 +0000 (13:35 -0500)]
Enable still more tests for generic filesystems
Make the following tests _supported_fs generic:
088 - test out CAP_DAC_OVERRIDE and CAP_DAC_SEARCH code
089 - Emulate the way Linux mount manipulates /etc/mtab
113 - aio-stress (explicitly mark as generic)
126 - tests various file permission options
129 - looptests
These all pass on ext3, ext4, btrfs, and gfs2 as well
as xfs.
Also remove "generic" group from "groups," which was
accidentally added.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de>
Eric Sandeen [Mon, 8 Jun 2009 16:27:23 +0000 (11:27 -0500)]
Allow fsx tests to run on generic filesystems
There is already logic in 075 to gracefully skip nfs for fsx
invocations with -x (xfs-specific preallocation) - just extend
this to any non-xfs filesystem, and add to test 112 as well.
Later we can change this behavior to use fallocate and include
more filesystems but this gets some fsx coverage for now.
Test 127 doesn't seem to have anything xfs-specific, so mark
that as generic too.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Felix Blyakher [Fri, 5 Jun 2009 20:41:14 +0000 (15:41 -0500)]
Add GPL license plate to SGI's 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>
Eric Sandeen [Thu, 4 Jun 2009 21:32:24 +0000 (16:32 -0500)]
aio-dio-regress: fix aio-dio-extend-stat on s390
This patch:
o Changes the BUFSIZE to 4096 so that we can successfully perform direct
I/O on devices that have a sector size of 4k, such as the virtual disks
found on the s390 architecture.
o Removes an unused variable.
o Checks the proper field in the ioevent to determine if there was an
error in the I/O submission.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Zach Brown <zach.brown@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Jeff Moyer [Wed, 3 Jun 2009 20:13:53 +0000 (15:13 -0500)]
Hi,
So, the xfs test suite does a mount, followed by running the test, then
an unmount after the test exits. aio-dio-invalidate-failure spawns two
children, and will kill them off before it exits. The problem is that
it doesn't wait for them to exit before returning, so the xfs test
harness ends up failing the umount as the mount point is still busy.
The fix is to simply wait for each of the children exits before
returning from the parent.
(Eric Sandeen: add one more waitpid to error case)
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Jeff Moyer [Wed, 3 Jun 2009 20:11:24 +0000 (15:11 -0500)]
aio-dio-regress: fix aio-dio-extend-stat on s390
Hi,
The following patch queries the sector size of the underlying device so
that we can size the write buffer appropriately. Without this patch, we
try to do an O_DIRECT write of 1KB to a device that has a sector size of
4KB. This returns EINVAL, of course. I also noticed that the test was
not checking the right fields for the return code. It was checking the
original iocb's nbytes field instead of event->res. So, I fixed that.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Jeff Moyer [Wed, 3 Jun 2009 20:09:34 +0000 (15:09 -0500)]
aio-dio-regress: align I/O buffers to 4k for 4k sector devices
(and virtual devices as found on s390)
Without this patch, these tests can randomly fail on s390 systems which
use a virtual block device with sector size of 4k. Testing confirms
that this patch resolves the issue.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Eric Sandeen [Tue, 2 Jun 2009 20:42:21 +0000 (22:42 +0200)]
enable generic filesystems to be checked
This includes a fair bit of rearranging to avoid code duplication,
but the goal is to allow 'fsck -n -t $FSTYP $device' to be run on
any generic filesystem.
Any FS for which this doesn't work will need it's own fsck routine.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
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>
Christoph Hellwig [Thu, 28 May 2009 15:04:15 +0000 (17:04 +0200)]
xfstests: move GPL boilerplates to fix lsqa.pl
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>
Christoph Hellwig [Sat, 21 Mar 2009 20:05:51 +0000 (21:05 +0100)]
add test 203, xfs_io bmap reallocation
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>
Christoph Hellwig [Sat, 21 Mar 2009 20:04:13 +0000 (21:04 +0100)]
xfstests: a couple of fixes for external logs
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>
Christoph Hellwig [Mon, 23 Feb 2009 13:28:06 +0000 (14:28 +0100)]
add "quick" group
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>
Christoph Hellwig [Fri, 20 Feb 2009 20:53:02 +0000 (21:53 +0100)]
remove tests 171, 172 and 173 from auto group
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>