Commit Graph

23 Commits

Author SHA1 Message Date
Eryu Guan 187e92903f common.attr: get block size of test fs not root fs
stat -f $TEST_DEV shows block size of the fs where $TEST_DEV
resides, usually it is the root fs. This will fail 020 on non-4096 block
size ext2/3/4, also 4096 block size ext2/3/4 on ppc64.

Instead, stat -f $TEST_DIR will show block size of the fs to be tested.

Tested and passed on ext2/3/4, xfs, btrfs with all supported block size.

Cc: Eric Sandeen <esandeen@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2012-07-03 22:11:10 -05:00
Eric Sandeen fff4359d8b 020: make this xattr test generic
020 can be made generic by limiting the total attribute space
used in the tests as appropriate.  Unless we know we have a
large-xattr-capable fs, limit total space to a bit under one
fs block.

Now passes for me on ext3, ext4, btrfs, as well as xfs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-03-31 20:14:06 +00:00
Eric Sandeen 2fb1c931a6 062: Sort recursive getfattr output
Test 062 was made "generic" a while back, but it fails on any filesystem
which returns getfattr -R results (aka readdir results) in something
other than inode-order.

With a little awk-fu we can sort the records from getfattr -R so that
the output is the same for xfs as well as ext4, etc.

Also filter out lost+found which extN creates at mkfs time, but
some other filesystems do not.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2012-01-27 12:28:20 -06:00
Amir Goldstein ff65626abd fix hardcoded reference to /mnt/test in common.attr
When trying to run test 70, we encountered several problems.
Sergey has strace'd some of the problems to attempts to
set xattr on the wrong test dir (/mnt/test/), which appears to be
hardcoded in common.attr.

Reported-by: Sergey Ivanov <sergey57@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-06-01 05:25:12 +09:00
Christoph Hellwig 5411ceb991 xfstests: add _require_attrs
Add a new helper to check if extended attributes are supported.  It
errors out if any of the attr tools are not found, or if a filesystem
does not support setting attributes.

Remove the opencoded checks for the attr tools from various tests
now that we do them in common code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2010-10-21 21:11:48 +02:00
Christoph Hellwig 15e17c9bac xfstests: fix _require_acl
Skip ACL tests if we get EOPNOTUPP back from the acl calls.  This is
the error code we get on a kernel that does support the xattr system
calls, but does not support the attributes used to handle Posix ACLs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2010-10-21 05:55:11 +02:00
Dave Chinner 3a3dfc5a67 xfstests: fix NIS detection damage
NIS detection wasn't tested on machines without NIS enabled, so many tests are
failing on non-NIS machines. the _yp_active function has no specific return
value so always evaluates as 0 (active) and the "_cat_passwd" function is
called from within an awk script which is not valid as the shell may run with a
sanitised environment. Hence the functions do not need specific export calls,
either, as unsanitised subshells will automatically inherit the parent's
environment.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-08-13 15:45:24 +10:00
Alex Elder cda0cb20ac xfstests: include NIS databases
If NIS is active on a test target system, additional password and
group file information is available via their respective databases
in NIS.  Currently, some tests assume that /etc/passwd and /etc/group
are the only places to find this information.

This patch causes both the local database and the NIS database (if
one is likely to be present) to be consulted for needed information.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-08-02 12:14:54 -05:00
Eric Sandeen 1728089cc9 xfstests: rename _acl_requirements to _require_acls
Most requirement tests are named _require_foo, so just
make this more consistent.

Also remove a few redundant tests for /usr/bin/chacl
since _require_acls covers that.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-02-05 11:04:10 -06:00
Eric Sandeen 640ecede93 xfstests: filter selinux output in _acl_ls etc
When selinux is on, ls -l gives us a "." to indicate selinux
attrs, which breaks some tests:

 === Test minimal ACE ===
 Setup file
--rwxrw-r-- id1 id2 file1
+-rwxrw-r--. id1 id2 file1

so make an _ls_l helper to filter that out.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-02-03 08:35:24 -06:00
Dave Chinner 771e69de67 xfstests: Convert all tests to use /bin/bash
While most tests use /bin/sh, they are dependent on /bin/sh being a
bash shell.  Convert all the tests to execute via /bin/bash as it is
much, much simpler than trying to debug and remove all the bashisms
throughout the test code.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2010-01-20 10:27:08 +11:00
Dave Chinner e714acc0ef 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>
2009-03-25 20:53:36 +01:00
Andrew Jones 895a7d2f48 Fixed double function issue with the UDF merge.
Merge of xfs-cmds-melb:slinx:20266a by kenmcd.

  Changed _filter_aces function call to _filter_aces_notypes
2004-11-23 13:52:17 +00:00
Andrew Jones d60075c5e7 Tests from UDFQA ported to FSQA.
simple attr tests for EAs.
2004-09-15 05:57:50 +00:00
Tim Shimmin 4c56e56f91 xfs qa changes to get thinks working on irix
add verbosity to a file for debugging
reduce iteration count
2004-08-10 03:55:47 +00:00
ptools cb6beb9759 Fixed merge problems 2004-06-15 07:32:36 +00:00
Eric Sandeen 3ef12e3824 Update copyright dates (again) 2002-06-04 23:07:56 +00:00
Eric Sandeen bc4eb461ae Undoes mod: xfs-cmds:slinx:120772a
Undo xfs-cmds:slinx:120772a, inadvertently whacked a previous mod.
2002-06-04 22:53:09 +00:00
Eric Sandeen 8ce73f8626 Update copyright dates 2002-06-04 17:58:21 +00:00
Tim Shimmin 9af88ebc77 Delete the notrun call.
067 no longer panics for me.
2002-05-22 02:21:06 +00:00
Tim Shimmin 263901a635 move some acl funcs into common.attr 2002-05-09 05:26:20 +00:00
Nathan Scott 7f3afdce47 gawk -> awk. 2001-04-06 03:23:12 +00:00
Andrew Gildfind a12763fe45 No Message Supplied 2001-04-02 00:41:31 +00:00