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>
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>
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>
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>
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>
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>
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.