Commit Graph

1495 Commits

Author SHA1 Message Date
Rich Johnston 7b2806e2e8 Revert "xfstests: resolve symlinked devices to real paths"
This reverts commit d5ea873fcb which overrode
0a818862bb xfstests: support post-udev device
mapper node.

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
2012-11-28 09:02:10 -06:00
Rich Johnston 024b1c0a71 Revert "xfstests: fix to build src/realpath and the correct the existence of target devices"
This reverts commit b03c662399 which overrode
the 0a818862bb xfstests: support post-udev
device mapper node.

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
2012-11-28 08:46:39 -06:00
Rich Johnston 9323f95f96 xfstests: resolve compiler warnings
This patch resolves the following compiler/configure warnings:

 configure: WARNING: unrecognized options: --enable-lib64 
 warning: 'xxxx' may be used uninitialized in this function [-Wuninitialized]
 warning: variable 'xxx' set but not used [-Wunused-but-set-variable]
 warning: call to function 'foo' without a real prototype [-Wunprototyped-calls] 

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2012-11-21 08:43:45 -06:00
Rich Johnston 131f750d7d xfstests: remove unused conditional NO_XFS
This patch removes the unused conditional NO_XFS which was added with
commit 332ee29d1a: 
  "xfstests updates - rework build to be like other xfs packages ..."

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2012-11-21 08:43:45 -06:00
Rich Johnston 818a42652a xfstests: remove unsupported conditionals
This patch removes the unsupported sgi and CRAY.

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2012-11-21 08:43:45 -06:00
sat b03c662399 xfstests: fix to build src/realpath and the correct the existence of target devices
Hi Rich, Eric

(2012/10/27 1:46), Rich Johnston wrote:
> On 06/08/2010 03:03 PM, Eric Sandeen wrote:
>> If you try running xfstests on lvm volumes which are symlinks,
>> it'll fail to run several tests because our _require_scratch
>> framework ultimately uses lstat not stat, and does not think
>> the lvm device (which is usually a symlink to a dm-X device)
>> is a block device.  Sigh.
>>
>> Last try at this - just resolve any symlinked devicenames
>> into their realpath(3) in common.config.
>>
>> This actually seems to work.
>>
>> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
>>
>> ---
>>
>>
>> diff --git a/common.config b/common.config
>> index 926846b..e5b2483 100644
>> --- a/common.config
>> +++ b/common.config
> 
> Looks good
> 
> Reviewed-by: Rich Johnston <rjohnston@sgi.com>
> 
> Eric,
> 
> This patch has been committed to git://oss.sgi.com/xfs/cmds/xfstests, master branch, commit ID d5ea873f.

From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

Commit d5ea873f is not the same as the the following original Eric's patch.

http://oss.sgi.com/archives/xfs/2010-06/msg00080.html

It does not modify src/Makefile and realpath is never compiled.

In addition, `[ -L $TEST_DEV ]' and `[ -L $SCRATCH_DEV ]' always returns 0
if $TEST_DEV or $SCRATCH_DEV are not defined.

Cc: Eric Sandeen <sandeen@sandeen.net>
Cc: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-11-21 08:18:53 -06:00
Eric Sandeen 2a4ed91a01 xfstest 291: userspace vs. fragmented multiblock dir2
Current xfs_repair is unhappy with fragmented multiblock
v2 directories.  This test shows it ... patches to fix
it soon to follow.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
2012-11-20 08:53:57 -06:00
Andrew Dahl 828463f727 xfstests: xfs_tosspages() test addition
Tests the XFS_IOC_ZERO_RANGE ioctl by way of the "xfs_io zero" utility
to ensure it is tossing the expected ranges.

The ranges tested are [0,1] [0,4095] [0,4096] [0,4097] [4095,8191]
  [4095,8192] [4095,8193] [4096,8192] [1024,4096]

Signed-off-by: Andrew Dahl <adahl@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
2012-11-20 08:53:57 -06:00
wenqing.lz 7eab7e9da1 xfstests: get return value in seek_sanity_test
In seek_sanity_test getting return value is missing. Thus we couldn't
get the result unless someone read the log file (e.g. # 285).

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
2012-11-20 08:53:57 -06:00
Rich Johnston 103af3fcab Revert "xfstests: optionally run all tests under quota"
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>

This reverts commit edd6bcf9c4 which caused
the following tests to fail:

142.out.bad:Can't initialize the DMAPI
143.out.bad:Can't initialize the DMAPI
144.out.bad:Can't initialize the DMAPI
145.out.bad:Can't initialize the DMAPI
146.out.bad:Can't initialize the DMAPI
147.out.bad:Can't initialize the DMAPI
150.out.bad:Can't initialize the DMAPI
155.out.bad:Can't initialize the DMAPI
156.out.bad:Can't initialize the DMAPI
157.out.bad:Can't initialize the DMAPI
158.out.bad:Can't initialize the DMAPI
161.out.bad:Can't initialize the DMAPI
168.out.bad:Can't initialize the DMAPI
175.out.bad:Can't initialize the DMAPI
176.out.bad:Can't initialize the DMAPI
185.out.bad:Can't initialize the DMAPI
2012-11-06 14:23:59 -06:00
Ben Myers 5b18e73653 xfstests: Update .gitignore
Root entries to where they only can occur.

Add patches/ and .pc/ for quilt.

Add /src/seek_copy_test and /src/seek_sanity_test.

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2012-10-31 12:13:16 -05:00
Jan Engelhardt c4850b1d17 xfstests: build: use new autoconf constructs
Looks like AC_CONFIG_FILES existed since 2.14 already.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-10-31 12:13:05 -05:00
Eryu Guan d1ffc87746 xfstests 250: remove unwanted new line in 250.out
Additional new line at the end of 250.out will fail the test, remove it.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-29 09:49:46 -05:00
Eric Sandeen 0b2ab695c1 xfstests: test ext4 statfs
Calculating free blocks in ext[234] is surprisingly hard, since
by default we report "bsd" style df which doesn't count filesystem
"overhead" blocks as used.

With a lot of code dedicated to sorting out what to report as
free, things tend to go wrong surprisingly often.

Here's a test to actually try to stop the next regression.  ;)

NB: For bsddf, the kernel currently does not count journal blocks
as overhead; it probably should.  But the test below looks to have
the result within 1% of perfection, so it still passes even if
the kernel doesn't count the journal against free blocks.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-29 08:47:09 -05:00
Eric Sandeen e2e226715b xfstests: more 214 updates
A few more updates for the 214 fallocate test, since
ext4 is having some fallocate trouble these days.

First off, updated 214.out was missing from the previous
commit to this file.

Second, run each test against a new filename and don't
remove it, so that the post-test fs check will have
more work to do.

Third, and a newly-found corruption case for ext4.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 10:39:57 -05:00
Eric Sandeen edd6bcf9c4 xfstests: optionally run all tests under quota
This patch might be a little heavy handed, but it seems to
work; if you set USE_QUOTA=1 in your environment, all
tests should be run with quota on and enabled.

This will hopefully help shake out some of the ext4
quota problems, although one needs to keep an eye
on the console to see whether warnings scroll by.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 10:39:23 -05:00
Eric Sandeen d5ea873fcb xfstests: resolve symlinked devices to real paths
If you try running xfstests on lvm volumes which are symlinks,
it'll fail to run several tests because our _require_scratch 
framework ultimately uses lstat not stat, and does not think 
the lvm device (which is usually a symlink to a dm-X device) 
is a block device.  Sigh.

Last try at this - just resolve any symlinked devicenames
into their realpath(3) in common.config.

This actually seems to work.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 10:38:30 -05:00
Eric Sandeen ac996c6686 xfstests: add local.config example
I think it'd be useful to have a local.config template in the
git repo, to avoid having to re-read the README each time
to remember the required environment variable names.

Thoughts?  Am I just lazy?  :)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 10:36:53 -05:00
Prasad Joshi 9ea06dcee7 xfstests: Assume yes when test device is not partitioned
If an entire device used for file system creation, the mkfs.ext2/3/4
asks for confirmation before proceeding. Since the device is
configured for testing it is safe to assume positive response
during mkfs.

The patch also replaces hard coded mkfs path with MKFS_PROG variable.

Signed-off-by: Chaitanya Kulkarni <chaitanyakulkarni15@gmail.com>
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-26 08:48:29 -05:00
Ben Myers e70927849a xfstests: rename configure.in to configure.ac
configure.in has been renamed to configure.ac.  Update the Makefile.

Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
2012-10-25 14:57:56 -05:00
Mike Frysinger ebc2cf34a7 xfstests: install shared libs with +x bits
These are shared libs w/executable code, so make sure they have +x bits
set on them.  Some kernels will proactively disallow executable mmaps if
the files lack +x bits.  It's also the right thing to do.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-10-24 16:57:50 -05:00
Mike Frysinger e3ca126a49 xfstests: respect DESTDIR when installing
This makes the `make install DESTDIR=...` form work.  It keeps support
for all previous forms too (like DIST_ROOT).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-10-24 16:55:04 -05:00
Mike Frysinger d197ba92ba xfstests: rename configure.in to configure.ac
Newer autotools warn and start to error with the older name.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-10-24 16:50:10 -05:00
Lukas Czerner 0b85927310 xfstests: Do not allow step to be zero
Currently 'step' variable which is used as length of the range to
discard can be zero. However it would result in error returned by the
fstrim.

Fix this by forcing 'step' to be at least 4KB.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-24 13:11:56 -05:00
Lukas Czerner 00d1bda60d xfstests: Test FITRIM where length is smaller than FSB
This tests corner case in FITRIM implementation where range size is
smaller than file system block or zero. In this case FITRIM should fail
with EINVAL.

The problem was spotted in xfs and ext4 where in case of length = 0 the
'end' variable underflowed. In case of length smaller than 1 FSB FITRIM
finished successfully, but we really should rather return EINVAL in both
cases.

(This patch has to be applied after 'Use upstream version of fstrim
instead of the local one')

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2012-10-24 12:43:33 -05:00