fstests: explicitly specify xattr namespace

Explicitly specify the xattr namespace required for tests.
This allows tests to be skipped correctly for filesystems
that don't support all xattr namespaces.

This changes all tests that require anything other than
the "user" xattr namespace. When called without arguments
as before, _require_attrs() still defaults to the "user"
namespace, so those tests do not need to be changed.

Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Frank van der Linden
2020-09-10 19:43:55 +00:00
committed by Eryu Guan
parent da3cdb3b91
commit 9860712610
15 changed files with 18 additions and 14 deletions
+4
View File
@@ -82,6 +82,10 @@ else
ATTR_MODES="user trusted"
ATTR_FILTER="^(user|trusted)"
fi
_require_attrs $ATTR_MODES
for nsp in $ATTR_MODES; do
for inode in reg dir lnk dev/b dev/c dev/p; do
+1 -1
View File
@@ -35,7 +35,7 @@ _supported_fs generic
_supported_os Linux
_require_test
_require_attrs
_require_attrs security
_require_user
_require_test_program "writemod"
_require_command "$SETCAP_PROG" "setcap"
+1 -1
View File
@@ -48,7 +48,7 @@ _supported_fs generic
_supported_os Linux
_require_test
_require_attrs
_require_attrs user trusted
echo -e "\ncreate file foo"
rm -f $file
+1 -1
View File
@@ -36,7 +36,7 @@ rm -f $seqres.full
_supported_fs generic
_supported_os Linux
_require_scratch
_require_attrs
_require_attrs trusted
_scratch_mkfs > $seqres.full 2>&1 || _fail "mkfs"
_scratch_mount
+1 -1
View File
@@ -39,7 +39,7 @@ _supported_os Linux
_require_scratch
_require_test
_require_acls
_require_attrs
_require_attrs trusted
_scratch_mkfs_sized $((256 * 1024 * 1024)) >> $seqres.full 2>&1
_scratch_mount || _fail "mount failed"
+1 -1
View File
@@ -37,7 +37,7 @@ _supported_fs overlay
_supported_os Linux
_require_test
_require_scratch
_require_attrs
_require_attrs trusted
# Remove all files from previous tests
_scratch_mkfs
+1 -1
View File
@@ -53,7 +53,7 @@ rm -f $seqres.full
_supported_fs overlay
_supported_os Linux
_require_scratch
_require_attrs
_require_attrs trusted
# Remove all files from previous tests
_scratch_mkfs
+1 -1
View File
@@ -32,7 +32,7 @@ _supported_os Linux
# Use non-default scratch underlying overlay dirs, we need to check
# them explicity after test.
_require_scratch_nocheck
_require_attrs
_require_attrs trusted
_require_test_program "t_dir_type"
rm -f $seqres.full
+1 -1
View File
@@ -35,7 +35,7 @@ _supported_os Linux
# them explicity after test.
_require_scratch_nocheck
_require_test
_require_attrs
_require_attrs trusted
_require_test_program "t_dir_type"
rm -f $seqres.full
+1 -1
View File
@@ -33,7 +33,7 @@ rm -f $seqres.full
_supported_fs overlay
_supported_os Linux
_require_scratch_nocheck
_require_attrs
_require_attrs trusted
_require_command "$FSCK_OVERLAY_PROG" fsck.overlay
OVL_XATTR_OPAQUE_VAL=y
+1 -1
View File
@@ -33,7 +33,7 @@ rm -f $seqres.full
_supported_fs overlay
_supported_os Linux
_require_scratch_nocheck
_require_attrs
_require_attrs trusted
_require_command "$FSCK_OVERLAY_PROG" fsck.overlay
# remove all files from previous tests
+1 -1
View File
@@ -33,7 +33,7 @@ rm -f $seqres.full
_supported_fs overlay
_supported_os Linux
_require_scratch_nocheck
_require_attrs
_require_attrs trusted
_require_command "$FSCK_OVERLAY_PROG" fsck.overlay
OVL_XATTR_IMPURE_VAL=y
+1 -1
View File
@@ -32,7 +32,7 @@ _cleanup()
_supported_fs xfs
_supported_os Linux
_require_attrs
_require_attrs trusted user
# create files with EAs
_create_dumpdir_fill_ea
+1 -1
View File
@@ -52,7 +52,7 @@ _supported_fs xfs
_supported_os Linux
_require_tape $TAPE_DEV
_require_attrs
_require_attrs trusted
_create_files
_erase_hard
+1 -1
View File
@@ -55,7 +55,7 @@ _supported_fs xfs
_supported_os Linux
_require_tape $TAPE_DEV
_require_attrs
_require_attrs trusted user
_create_files
_erase_hard