xfstests-dev.git
12 years agoMake "new" script insert appropriate license on tests
Eric Sandeen [Fri, 5 Jun 2009 22:07:20 +0000 (17:07 -0500)]
Make "new" script insert appropriate license on tests

Don't default to SGI copyright, someone else may be
making this test...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoAdd GPL license plate to SGI's files.
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>
12 years agoupdate aio-stress.c, with copyright information intact
Eric Sandeen [Fri, 5 Jun 2009 19:12:27 +0000 (14:12 -0500)]
update aio-stress.c, with copyright information intact

Pulled from:
http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/kernel/io/ltp-aiodio/aio-stress.c
revision 1.8

There are a couple new options, but the main motivator is to
get the license text intact again.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoadd license boilerplate to 205
Dave Chinner [Fri, 5 Jun 2009 09:51:55 +0000 (11:51 +0200)]
add license boilerplate to 205

Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
12 years agoaio-dio-regress: fix aio-dio-extend-stat on s390
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>
12 years agoRevert "aio-dio-regress: fix aio-dio-extend-stat on s390"
Eric Sandeen [Thu, 4 Jun 2009 21:29:39 +0000 (16:29 -0500)]
Revert "aio-dio-regress: fix aio-dio-extend-stat on s390"

This reverts commit 6b26794772a4acbe8df1cc48d7a169011268d97e.

A later version of this patch was submitted, and I committed
the wrong one.  -Eric

12 years agoxfstests: fix syntax error in check
Christoph Hellwig [Thu, 4 Jun 2009 17:12:55 +0000 (19:12 +0200)]
xfstests: fix syntax error in check

Bash 3.2 wants a space before the closing "]" in a test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
12 years agoCheck for xlog_assign_lsn in xfs headers
Eric Sandeen [Wed, 3 Jun 2009 20:15:15 +0000 (15:15 -0500)]
Check for xlog_assign_lsn in xfs headers

Checking for libxfs.h isn't enough; some debian installs
have libxfs.h but no xlog_assign_lsn, and the loggen build still
fails.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Tested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoHi,
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>
12 years agoaio-dio-regress: fix aio-dio-extend-stat on s390
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>
12 years agoaio-dio-regress: align I/O buffers to 4k for 4k sector devices
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>
12 years agoAdd aio-dio-regress tests
Eric Sandeen [Wed, 3 Jun 2009 20:07:02 +0000 (15:07 -0500)]
Add aio-dio-regress tests

Pull in the aio-dio-regress test suite from
http://git.kernel.org/?p=linux/kernel/git/zab/aio-dio-regress.git

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agodon't run 122 if required headers aren't found
Eric Sandeen [Wed, 3 Jun 2009 18:12:20 +0000 (13:12 -0500)]
don't run 122 if required headers aren't found

Now that libxfs etc is optional, 122 (which compiles on the fly)
is failing if those extra headers are missing.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoMake the SCRATCH_DEV optional
Eric Sandeen [Wed, 3 Jun 2009 18:11:35 +0000 (13:11 -0500)]
Make the SCRATCH_DEV optional

Tests will fail gracefully if there is no SCRATCH_DEV defined, so change

the check script to allow it, and update README to reflect this.

This just makes it simpler to set up the tests, at the expense of
coverage.

Long term it might be nice to allow either SCRATCH_DEV xor TEST_DEV
to be missing, but for now this is simple.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoenable generic filesystems to be checked
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>
12 years agolibxfs.h is really only needed for the loggen test;
Eric Sandeen [Tue, 2 Jun 2009 20:36:13 +0000 (15:36 -0500)]
libxfs.h is really only needed for the loggen test;
make it config-time optional.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
12 years agoxfstests: initial reiserfs, gfs2, btrfs support
Eric Sandeen [Fri, 29 May 2009 20:12:28 +0000 (15:12 -0500)]
xfstests: initial reiserfs, gfs2, btrfs support

This patch gets reiserfs, gfs2, and btrfs off the ground.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoFix 206 expected output
Eric Sandeen [Fri, 29 May 2009 18:02:59 +0000 (13:02 -0500)]
Fix 206 expected output

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoTest trim of last small AG for large filesystem resizes
Eric Sandeen [Fri, 29 May 2009 17:48:23 +0000 (12:48 -0500)]
Test trim of last small AG for large filesystem resizes

As reported at
http://article.gmane.org/gmane.comp.file-systems.xfs.general/29187
this trimming may cause an overflow in the new size calculation.

Patch to fix it, and testcase at
http://article.gmane.org/gmane.comp.file-systems.xfs.general/29193

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoxfstests: add GPL boilerplates to my testcases
Eric Sandeen [Thu, 28 May 2009 18:27:36 +0000 (13:27 -0500)]
xfstests: add GPL boilerplates to my testcases

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
12 years agoReport which tests did get run
Eric Sandeen [Thu, 28 May 2009 16:40:39 +0000 (11:40 -0500)]
Report which tests did get run

fs type mismatches are now likely enough that it may be
nice to report which tests -were- run at the end...

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoSet default extN mount options
Eric Sandeen [Thu, 28 May 2009 16:39:20 +0000 (11:39 -0500)]
Set default extN mount options

ext2/3/4 don't support acls & attrs w/o specific mount
options, so make those the default whenever we mount
these filesystems.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoDetect FS type to test based on TEST_DEV
Eric Sandeen [Wed, 27 May 2009 18:44:57 +0000 (13:44 -0500)]
Detect FS type to test based on TEST_DEV

This helps support generic / non-xfs fileystems.

Rather than defaulting to xfs or expecting a fs
type passed in, just look at what is on TEST_DEV
and use that for FSTYP by default.

We may wish to add a generic way to override this later.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
12 years agoSet up testdir for generic filesystems
Eric Sandeen [Thu, 28 May 2009 16:38:16 +0000 (11:38 -0500)]
Set up testdir for generic filesystems

Make the default filesystem testdir setup the same as
what xfs did; simply set up the testdir variable.

Update the comment for UDF & NFS, as to why they are
currently doing something different.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years ago069: make scratch mkfs quiet
Eric Sandeen [Thu, 28 May 2009 16:37:56 +0000 (11:37 -0500)]
069: make scratch mkfs quiet

The _scratch_mkfs call in test 069 was not redirecting
stderr to /dev/null; other mkfs's may be more noisy
on stderr.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoSupport "generic" filesystem type
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>
12 years agoUse xfs.h rather than libxfs.h
Eric Sandeen [Thu, 28 May 2009 16:36:27 +0000 (11:36 -0500)]
Use xfs.h rather than libxfs.h

Use xfs/xfs.h when possible rather than xfs/libxfs.h,
now that libxfs.h isn't part of a normal xfsprogs-devel
install.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoDrop the xfs-specific MAXNAMELEN in favor of the Posix NAME_MAX
Eric Sandeen [Thu, 28 May 2009 16:35:56 +0000 (11:35 -0500)]
Drop the xfs-specific MAXNAMELEN in favor of the Posix NAME_MAX

This makes it easier to lose libxfs.h later.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoxfstests: move GPL boilerplates to fix lsqa.pl
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.

Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoxfstests: only run 164 for xfs
Christoph Hellwig [Wed, 27 May 2009 08:12:34 +0000 (10:12 +0200)]
xfstests: only run 164 for xfs

Test 164 uses the xfs_io bmap subcommand which only works for XFS,
so don't offer it for nfs and udf.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
12 years agoxfstests: add GPL boilerplates to my testcases
Christoph Hellwig [Wed, 27 May 2009 08:10:42 +0000 (10:10 +0200)]
xfstests: add GPL boilerplates to my testcases

Signed-off-by: Christoph Hellwig <hch@lst.de>
12 years agoMerge branch 'master' of git://oss.sgi.com/xfs/cmds/xfstests
Christoph Hellwig [Wed, 27 May 2009 07:55:51 +0000 (09:55 +0200)]
Merge branch 'master' of git://oss.sgi.com/xfs/cmds/xfstests

12 years agoAdd GPL license plate to SGI's test files.
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>
13 years agofsx: Add check for mmap last-page zero fill
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>
13 years agofsx: Replace use of bcmp() with memcmp()
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>
13 years agofsx: Replace use of bzero() with memset()
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>
13 years agofsx: Use %ll instead of %q in printf format statements
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>
13 years agofsx: Use SEEK_END instead of the BSD'ish L_XTND
Theodore Ts'o [Wed, 13 May 2009 18:31:47 +0000 (13:31 -0500)]
fsx: Use SEEK_END instead of the BSD'ish L_XTND
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoxfstests: tidy up 205
Eric Sandeen [Sun, 10 May 2009 15:42:09 +0000 (10:42 -0500)]
xfstests: tidy up 205

Test 205 wasn't marked executable, and had the wrong test
number in the comments.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
13 years agoxfstests 042: point xfs_fsr right at the fragmented file
Eric Sandeen [Sat, 9 May 2009 03:03:40 +0000 (22:03 -0500)]
xfstests 042: point xfs_fsr right at the fragmented file

Somehow 042 as it stands isn't actually defragging the fragmented
file we created (see 042.full post-run)

Probably need to look into that as well, but for now this should
make the call to fsr actually _do_ something.

This has let 2 fsr bugs slip through qa in the past few months.   :(

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
13 years agoxfstests: fix 130, 132 for inifinitely-fast disks
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>
13 years agoRevert "patch more_set_prog_path"
Eric Sandeen [Thu, 23 Apr 2009 17:42:32 +0000 (12:42 -0500)]
Revert "patch more_set_prog_path"

This reverts commit b2fcff900de26dd0b742d2e77fbfc6b8dc13c83e.

This snuck in unintentionally due to my weak git-fu,
and was breaking things.

13 years agoxfstests: filter out imaxpct value in test 096
Eric Sandeen [Thu, 23 Apr 2009 17:33:03 +0000 (12:33 -0500)]
xfstests: filter out imaxpct value in test 096

On large filesystems, imaxpc drops from 25 to 5,
so filter out that difference.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoxfstests: skip fsr tests if xfs_fsr utils not found
Eric Sandeen [Mon, 20 Apr 2009 02:10:42 +0000 (21:10 -0500)]
xfstests: skip fsr tests if xfs_fsr utils not found

Similar to the xfsdump-related patch; gracefully fail
if no xfs_fsr is found.

I'll probably send another for the acl & attr userspace,
it's actually not always installed on minimal boxes.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
13 years agoxfstests: skip dump tests if dump utils not found
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>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev
Eric Sandeen [Sun, 19 Apr 2009 20:48:54 +0000 (15:48 -0500)]
Merge branch 'master' of git://git./fs/xfs/xfstests-dev

13 years agopatch more_set_prog_path
Eric Sandeen [Sun, 19 Apr 2009 20:48:48 +0000 (15:48 -0500)]
patch more_set_prog_path

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev
Felix Blyakher [Mon, 13 Apr 2009 21:47:23 +0000 (16:47 -0500)]
Merge branch 'master' of git://git./fs/xfs/xfstests-dev

13 years agoxfstests: fix async io error handling in fsx
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>
13 years agoxfstests: test 205, test writing to ENOSPC
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>
13 years agoxfstests: add test 204, a simple delayed allocation ENOSPC test
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>
13 years agoxfstests: Add a .gitignore file
Josef 'Jeff' Sipek [Mon, 13 Apr 2009 13:49:04 +0000 (15:49 +0200)]
xfstests: Add a .gitignore file

Ignore generated files.

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>
13 years agoxfstests: make the mode consistent for all the test scripts
Josef 'Jeff' Sipek [Mon, 13 Apr 2009 13:45:41 +0000 (15:45 +0200)]
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>
13 years agoreduce the number of processes forked
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>
13 years agoadd test 203, xfs_io bmap reallocation
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>
13 years agoxfstests: a couple of fixes for external logs
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>
13 years agoadd "quick" group
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>
13 years agotest 134 requires quotas
Christoph Hellwig [Fri, 20 Feb 2009 20:54:56 +0000 (21:54 +0100)]
test 134 requires quotas

Add a  _require_quota call to make sure it shows up as not run and not
as failed if the kernel doesn't support quotas.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoremove tests 171, 172 and 173 from auto group
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>
13 years agotest 199: test features2 fixup for the regular case, too
Christoph Hellwig [Sun, 15 Feb 2009 18:18:47 +0000 (19:18 +0100)]
test 199: test features2 fixup for the regular case, too

Eric Sandeen noted that we should not only test the mount ro first, then
remount rw case in 199 but also the regular mount rw case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agotest 201: fix comment typos
Christoph Hellwig [Sun, 15 Feb 2009 18:17:21 +0000 (19:17 +0100)]
test 201: fix comment typos

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoxfstests: Fix *FLAGS passing and dependencies.
Arkadiusz Miśkiewicz [Mon, 2 Feb 2009 20:20:02 +0000 (14:20 -0600)]
xfstests: Fix *FLAGS passing and dependencies.

Pass *FLAGS in some targets.

Drop LIBHANDLE, LIBATTR and LIBACL from deps since there are in form
"-llibrary".

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoUse explict libtool CC tag
Arkadiusz Miśkiewicz [Sun, 1 Feb 2009 22:10:50 +0000 (16:10 -0600)]
Use explict libtool CC tag

(sometimes libtool can't decide what tag is correct one
if omited).

Preserve CFLAGS/CPPFLAGS to allow:
CPPFLAGS="-I$HOME/here-is-xfsprogs-installed/include" \
LDFLAGS="-L$HOME/here-is-xfsprogs-installed/lib" \
./configure  ...

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoadd test 202, xfs_repair handling of single-AG filesystems
Christoph Hellwig [Sun, 25 Jan 2009 20:31:16 +0000 (21:31 +0100)]
add test 202, xfs_repair handling of single-AG filesystems

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agofix 122 for removed btree types
Christoph Hellwig [Sun, 25 Jan 2009 20:30:07 +0000 (21:30 +0100)]
fix 122 for removed btree types

With the the btree refactoring various btree trypes have been removed,
so remove them from the golden output for 122.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoadd test 201: btree corruption without CONFIG_LBD
Christoph Hellwig [Thu, 22 Jan 2009 20:19:14 +0000 (21:19 +0100)]
add test 201: btree corruption without CONFIG_LBD

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
13 years agorun 092 unconditionally
Christoph Hellwig [Mon, 19 Jan 2009 03:49:43 +0000 (04:49 +0100)]
run 092 unconditionally

Now that we support inode64 filesystem on 32-bit plaforms tests 092
should be run unconditionally.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoDon't run test 197 on 64-bit machines
Eric Sandeen [Mon, 19 Jan 2009 01:29:38 +0000 (19:29 -0600)]
Don't run test 197 on 64-bit machines

If it always passes on 64 bits, this gives a false
sense of security.  Make it obvious.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: add test 200, exercise read-only block devices and mounts
Christoph Hellwig [Sat, 10 Jan 2009 20:38:24 +0000 (21:38 +0100)]
xfstests: add test 200, exercise read-only block devices and mounts

Make sure we do the right thing with blockdevices with a hard read-only
flag.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoxfstests: add test 199, bad_features2 correction
Christoph Hellwig [Sat, 10 Jan 2009 20:37:27 +0000 (21:37 +0100)]
xfstests: add test 199, bad_features2 correction

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoAdd Makepkgs support to xfstests (tar & rpm only so far)
Eric Sandeen [Sat, 3 Jan 2009 04:29:32 +0000 (22:29 -0600)]
Add Makepkgs support to xfstests (tar & rpm only so far)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoCreate xfstests install target.
Eric Sandeen [Sat, 3 Jan 2009 04:28:37 +0000 (22:28 -0600)]
Create xfstests install target.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agotest 198, testcase for aio+dio writes into sparse files
Eric Sandeen [Wed, 31 Dec 2008 12:06:23 +0000 (13:06 +0100)]
test 198, testcase for aio+dio writes into sparse files

Older kernels were not doing completion properly, and converting
unwritten extents at the wrong offsets; this exposed stale data.

Xen w/ the blktap driver was hitting this.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agotest 197, add a testcase for d_off truncation
Christoph Hellwig [Wed, 31 Dec 2008 11:59:19 +0000 (12:59 +0100)]
test 197, add a testcase for d_off truncation

Make sure our directory offsets fit into a 32 bit value.
Based on a report by John Stanley.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agotest 196, add a testcase for renames across project boundaries
Christoph Hellwig [Wed, 31 Dec 2008 11:53:33 +0000 (12:53 +0100)]
test 196, add a testcase for renames across project boundaries

Make sure rename across project boundaries is rejected and doesn't
cause hangs.  Based on a report and testcase from Arkadiusz Miskiewicz.

Signed-off-by: Christoph Hellwig <hch@lst.de>
13 years agotest 195, add a testcase for the nodump flag
Christoph Hellwig [Wed, 31 Dec 2008 11:53:21 +0000 (12:53 +0100)]
test 195, add a testcase for the nodump flag

Based on http://oss.sgi.com/bugzilla/show_bug.cgi?id=340.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agoupdate for xfs_dinode_core_t removal
Christoph Hellwig [Wed, 31 Dec 2008 11:52:35 +0000 (12:52 +0100)]
update for xfs_dinode_core_t removal

Strip away the core. prefixes in 186 to make sure the golden output
works for both old and new xfsprogs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agofix compiler warnings
Christoph Hellwig [Wed, 31 Dec 2008 11:52:05 +0000 (12:52 +0100)]
fix compiler warnings

Include all nessecary headers, use the correct format strings and don't
redefine _GNU_SOURCE.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
13 years agotest 194, test tricky mapping/conversion around holes
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>
13 years agoadd more tests to the auto group
Christoph Hellwig [Tue, 30 Dec 2008 22:33:39 +0000 (23:33 +0100)]
add more tests to the auto group

make sure we run all tests than don't either take forever or currently fail
(or require a tape drive) to the auto group.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
13 years agofix dbtest build
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?

Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agofix xfsqa 189 for log and rt devices
Matthew Kent [Tue, 30 Dec 2008 22:33:30 +0000 (23:33 +0100)]
fix xfsqa 189 for log and rt devices

Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoxfstests: add a unified diff option
Matthew Kent [Tue, 30 Dec 2008 22:33:24 +0000 (23:33 +0100)]
xfstests: add a unified diff option

Add the -udiff option to the test driver to make test output more
easily readable.

[hch:  made -udiff the default]

Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agofix number of arguments to AC_DEFINE
Mike Frysinger [Tue, 30 Dec 2008 22:21:52 +0000 (23:21 +0100)]
fix number of arguments to AC_DEFINE

aclocal hates when you only specify one parameter to AC_DEFINE ... simple patch
to add the other two parameters

fixes for acl and xfstests

[hch: added nfs4acl]

Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agofix up xfs-cmds build after the parallel-fest
Eric Sandeen [Tue, 30 Dec 2008 22:21:24 +0000 (23:21 +0100)]
fix up xfs-cmds build after the parallel-fest

My big parallel build patch lost the "make configure" target.
This broke Makepkgs...

Now, IMHO, running configure from make is a little bass-ackwards;
I'd probably prefer to have Makepkgs explicitly run:

 autoconf; configure --myoptions; make

but for now, this adds back in a workable "make configure" target.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agoTest out the perm checks in xfs_setattr - chmod, chown, etc..
Tim Shimmin [Wed, 10 Dec 2008 14:03:09 +0000 (14:03 +0000)]
Test out the perm checks in xfs_setattr - chmod, chown, etc..
Merge of master-melb:xfs-cmds:32713a by kenmcd.

  Test out the perm checks in xfs_setattr - chmod, chown, etc..

13 years agoTest out that access time is updated correctly in memory and on disk.
Tim Shimmin [Tue, 9 Dec 2008 14:15:47 +0000 (14:15 +0000)]
Test out that access time is updated correctly in memory and on disk.
Merge of master-melb:xfs-cmds:32647a by kenmcd.

  Test out that access time is updated correctly in memory and on disk.

13 years agoXFS Quota tests were unaware of usrquota and grpquota mount options
Brad Scarlett [Tue, 2 Dec 2008 04:56:16 +0000 (04:56 +0000)]
XFS Quota tests were unaware of usrquota and grpquota mount options
Merge of master-melb:xfs-cmds:32619a by kenmcd.

  Fix 134 so it is notrun if grpquota mount option is detected.

13 years agoTake into account nfs4acl output
Donald Douwsma [Mon, 1 Dec 2008 14:09:30 +0000 (14:09 +0000)]
Take into account nfs4acl output
Merge of master-melb:xfs-cmds:32613a by kenmcd.

13 years agomkfe2fs unfortunately hasn't heard about real enterprise setups using
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.

  fix xfsqa on whole disks

13 years agoFedora is catching calls to open which have O_CREAT set w/o a mode.
Barry Naujok [Tue, 25 Nov 2008 03:10:07 +0000 (03:10 +0000)]
Fedora is catching calls to open which have O_CREAT set w/o a mode.
Merge of master-melb:xfs-cmds:32535a by kenmcd.

  Fedora is catching calls to open which have O_CREAT set w/o a mode.

13 years agoChange mode string variable declaration
Barry Naujok [Tue, 25 Nov 2008 03:09:43 +0000 (03:09 +0000)]
Change mode string variable declaration
Merge of master-melb:xfs-cmds:32533a by kenmcd.

  Change mode string variable declaration

13 years agoAllow parallel builds of the xfstests package
Barry Naujok [Fri, 21 Nov 2008 02:44:04 +0000 (02:44 +0000)]
Allow parallel builds of the xfstests package
Merge of master-melb:xfs-cmds:32515a by kenmcd.

  Allow parallel builds of the xfstests package

13 years agoCreate a tape group for anything which expects
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.

  create tape group

13 years agoxfstests: fix buffer overflow in lstat64.c
Barry Naujok [Thu, 20 Nov 2008 14:24:01 +0000 (14:24 +0000)]
xfstests: fix buffer overflow in lstat64.c

lstat64.c was putting an 11-byte string into a 10-byte buffer.
Merge of master-melb:xfs-cmds:32512a by kenmcd.

  fix buffer overflow in lstat64.c

13 years agoxfstest: confirm mkfs.gfs[2] in test 032
Barry Naujok [Thu, 20 Nov 2008 14:23:38 +0000 (14:23 +0000)]
xfstest: confirm mkfs.gfs[2] in test 032

mkfs.gfs[2] asks for confirmation before mkfs'ing; without
this test 032 hangs when mkfs.gfs2 is present.

Also, mkfs.gfs needs a few more args to make it go.
Merge of master-melb:xfs-cmds:32510a by kenmcd.

  confirm mkfs.gfs[2] in test 032

13 years agoxfstests: fix nr of args in open calls
Barry Naujok [Thu, 20 Nov 2008 14:23:14 +0000 (14:23 +0000)]
xfstests: fix nr of args in open calls
Merge of master-melb:xfs-cmds:32509a by kenmcd.

  fix nr of args in open calls

13 years agoxfstests: check for dmapi headers
Barry Naujok [Thu, 20 Nov 2008 14:22:49 +0000 (14:22 +0000)]
xfstests: check for dmapi headers
Merge of master-melb:xfs-cmds:32507a by kenmcd.

  xfstests: check for dmapi headers

13 years agoLong devicenames cause this quota output to split onto 2 lines:
Tim Shimmin [Thu, 6 Nov 2008 15:10:24 +0000 (15:10 +0000)]
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>
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>
13 years agoUpdate 189.out for the touch test.
Tim Shimmin [Wed, 15 Oct 2008 15:49:12 +0000 (15:49 +0000)]
Update 189.out for the touch test.
Merge of master-melb:xfs-cmds:32339a by kenmcd.

  Update 189.out for the touch test.