Commit Graph

1510 Commits

Author SHA1 Message Date
Andrew Dahl e5f1a13792 xfstests: Refactor release scripts to conform to using git archive
Refactored release scripts to conform to using git archive

When generating a release, there is a risk of some files being
stale, such as configure and the m4/autotools temp files. This
is fixed with a clean at the beginning of release generation.
In addition, there is no uniformity in the current method of
source tar generation between xfs utilities. Using git archive
solves this issue across all utilities.

Signed-off-by: Andrew Dahl <adahl@sgi.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-02-01 10:55:23 -06:00
Eric Sandeen 8322038f2b xfstests: test dump/restore of file capabilities
xfsrestore isn't properly restoring file capabilities; it restores
them, but then chowns the file, which removes the caps:

Call Trace:
 [<ffffffffa028de68>] xfs_xattr_set+0x118/0x120 [xfs]
 [<ffffffff8119a8c0>] generic_removexattr+0x80/0x90
 [<ffffffff8120b408>] cap_inode_killpriv+0x28/0x30
 [<ffffffff8120c666>] security_inode_killpriv+0x16/0x20
 [<ffffffff81192edf>] notify_change+0x18f/0x330
 [<ffffffff81176b70>] chown_common+0x60/0xa0
 [<ffffffff81176c30>] sys_fchown+0x80/0xd0
 [<ffffffff81537c59>] system_call_fastpath+0x16/0x1b

This test demonstrates the problem.

Reported-by: fugazzi® <fugazzi99@gmail.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-29 17:26:02 -06:00
Andrew Dahl 2388d7d861 xfstests: SGI license update for looptest.c
Updated SGI license in looptest.c 

Signed-off-by: Andrew Dahl <adahl@sgi.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-29 15:31:44 -06:00
Eric Sandeen ae2328e7c9 xfstests: test multiply-logged inodes & continued transactions
New test for 2 xfs_logprint error cases:

As xlog_print_trans_inode() stands today, it will error
out if more than one flag is set on f->ilf_fields:

	xlog_print_trans_inode: illegal inode type

but this is a perfectly valid case, to have i.e. a data and
an attr flag set.

and:

xlog_print_trans_inode() has a special case for 2
specific op_head->oh_len lengths.  If it matches
sizeof(xfs_inode_log_format_32_t) or
sizeof(xfs_inode_log_format_64_t), it assumes that
it's got an inode, and attempts to convert it and
print it accordingly.

However, if we arrive here via an op header which
is continued, then the length is simply a continuation
of the previous op, and it might *randomly* match the
size of one of the inode log formats, and thus get parsed
incorrectly.

Test both of these cases.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-29 13:59:56 -06:00
Satoru Takeuchi b3d0a7d09a xfstests: Change the interpreter of ltp/runtest.sh to bash
In some environment, Running 080 fails with many errors.
 
It happens because ltp/rwtest.sh assumes /bin/sh is `bash' and it's not
always true (ex. /bin/sh is `dash' in Debian.) This script should
explicitly declare that its interpreter is `bash'.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-22 13:13:13 -06:00
Liu Bo c52c134f1a xfstests: fix 284 ENOENT error
284 misses a 'mkdir' operation.

Signed-off-by: Liu Bo <liub.liubo@gmail.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-21 17:02:05 -06:00
Eric Sandeen 2f136d62bf xfstests: test EROFS vs. EEXIST when creating on an RO filesystem
TBH, I don't know if this is posix-specified, but I found out the
hard way that when trying to re-create existing files on a readonly 
filesystem, some apps expect/handle EEXIST, but fail on EROFS.

This will test mkdir, mknod, and symlinks for that behavior.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-21 16:42:04 -06:00
Eric Sandeen 26966520cc xfstests: move _filter_ln to common.filter
Move test 103's _filter_ln to common.filter and make
it more generic (not depending on 103's pathnames).

TBH I've lost my children's treasury of ln failure
messages, so I'm not sure this catches all variants;
it's hard to work backwards from the existing sed script
to what the various outputs were.  This works for me
but might need more tweaking on other systems.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-18 16:44:37 -06:00
Lukas Czerner 11c1d79414 xfstests: Change the diff output of failed tests
Currently the entire diff is printed to the stdout in the case that the
test output template differs from the actual test run. However in some
cases the diff can be _very_ long. This commit changes it so that we
print only first 10 lines of the diff.

Also indent the diff output from the left by four spaces for better
output readability.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-17 16:43:19 -06:00
Eric Sandeen 244295ab8a xfstests: ensure all xfs_io commands are documented in the manpage
Ensure that all commands listed in "xfs_io -c help" are
documented in the xfs_io(8) manpage.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
2013-01-17 10:13:58 -06:00
Eric Sandeen 8bf7774258 xfstests: Ensure cmdline geometry puts mkfs.xfs into multidisk mode
Ensure that when mkfs.xfs is invoked with commandline geometry, it
triggers multidisk mode and creates more AGs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-04 14:20:10 -06:00
Jan Kara 09584ace12 xfstests: Use qa_user and qa_group for test 219
Test 219 requires a special user. Use $qa_user and $qa_group (added in this
patch) for that purpose instead of hardcoded uid & gid. This also fixes
a false failure when repquota does not report quota for users not in passwd.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-04 12:42:02 -06:00
Eric Sandeen 3c27024321 xfstests: _fail in _scratch_mkfs_sized if device is too small
Without this, 273 was failing in cryptic ways for me
if the device size was < 2G.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-12-18 12:05:49 -06:00
Ben Myers ecdb4d6179 xfstests: update version and changelog
Update the version and changelog for xfstests-1.1.1 release.

Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Nathan Scott <nathans@debian.org>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
2012-12-12 11:10:11 -06:00
Dave Chinner 1e4f2626df xfstests: update XFS_IOC_ZERO_RANGE byte range test output
Kernel code now does true byte range zeroing. Update the tests to
validate true byte range zeroing correctly.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Andrew Dahl <adahl@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2012-11-29 17:17:12 -06:00
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