Commit Graph

35 Commits

Author SHA1 Message Date
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
Eric Sandeen 99102d6247 xfstests 062: Also accept "no such attribute" errors for invalid extended attributes
In older Linux kernels, requesting an extended attribute which cannot exist
failed with EPERM.  In version 3.0, this was changed to ENODATA so that
programs can distinguish between missing attributes and permission problems
independent of the file type.

For example, lgetxattr("file", "user.name", NULL, 0) will now return ENODATA if
no such attribute exists even if "file" is a symbolic link.

In test 062, to make it work on kernels before and after 3.0, accept either of
the two error results from getfattr.

Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
2011-08-19 09:57:12 -05:00
Stefan Behrens b2b36d0a4e make more tests generic
Use _scratch_mkfs / _scratch_mkfs_sized instead of _scratch_mkfs_xfs where
possible. Execute 015, 062, 083, 117, 120 and 192 for all filesystems, these
tests used to be XFS specific.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2011-08-03 14:00:15 +02:00
Christoph Hellwig d0b69e2ee6 xfstests: remove dead code in test 062
The _linux_attr_calls function is never called, remove it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
2010-10-25 10:17:14 -05:00
Alex Elder 580b0a9386 xfstests: use a common _filter_scratch function
There are a number of tests that use a shell function called
"filter_scratch" or "_filter_scratch" in order to have the actual
scratch device or mount point show up in test output with a symbolic
name.  There are two sets, each following a slightly different
convention.  Put a common _filter_scratch function definition in
"common.filter" and have all test scripts use that instead.
Choosing one of the two conventions meant that a few test output
files had to be changed.

In addition, add a call to _filter_scratch to test 185, and update
its output accordingly.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2010-10-22 09:13:06 -05: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
Arkadiusz Miśkiewicz 903b50fad9 Don't hardcode paths to many binaries.
Stop hardcoding paths to getfattr, setfattr, attr, quota, xfs_quota,
killall, indent and xfs_copy binaries.

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>

- new
Signed-off-by: Christoph Hellwig <hch@lst.de>
2010-09-11 19:34:47 -03: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
Christoph Hellwig f381f98206 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>
2009-05-28 17:04:15 +02:00
Felix Blyakher 65491dc047 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>
2009-05-26 16:51:14 -05:00
Tim Shimmin 5291ccbe23 need to filter out scratch device for setfattr tests since they
report errors and mention the mount point.
Merge of master-melb:xfs-cmds:25252a by kenmcd.

  need to filter out scratch device for setfattr tests since they
  report errors and mention the mount point.
2006-02-21 02:50:34 +00:00
Nathan Scott 640164847a Update copyright annotations and license boilerplates to correspond with SGI Legals preferences.
Merge of master-melb:xfs-cmds:24327a by kenmcd.
2005-11-09 02:49:08 +00:00
fsgqa 562962e6b1 QA tweaks - use a single os type source mainly (drop get_os, use HOST_OS) 2004-06-16 06:08:04 +00:00
ptools cb6beb9759 Fixed merge problems 2004-06-15 07:32:36 +00:00
Mandy Kirkconnell 1262ba3c4a Add xfsdump support for the security extended attributes namespace.
Execute security attribute tests if $USE_ATTR_SECURE environment variable
is set to "yes" (security attribute tests disabled by default - "no").
2004-02-26 00:31:25 +00:00
fsgqa 8745fd5938 Update to allow this test to be easily extended for exercising the security namespace. 2004-01-20 06:39:32 +00:00
Nathan Scott f419391566 Remove (busted anyway) Id rcs keywords for keeping trees in sync 2003-06-24 06:21:22 +00:00
fsgqa 8050efd492 Numerous changes to QA scripts allowing tests to run with external log/rt devices; also allow multiple mkfs/mount options at once now. 2003-05-22 04:16:45 +00:00
fsgqa 4044dd3050 Update QA tests to work with new attribute code (trusted namespace). 2003-02-25 09:13:13 +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
fsgqa f29425d6f7 tidy mkfs parameterisation, -f option pulled into common.rc. 2002-05-06 07:44:22 +00:00
Nathan Scott 75c3f1d685 fix use of -B which got reworked to be --restore. 2002-02-26 22:30:57 +00:00
Nathan Scott 1039f2f3e3 Merge of xfs-cmds-2.4.18:slinx:112579a by nathans.
getfattr -a --> --absolute-names.
2002-02-25 23:10:01 +00:00