diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-08-30 06:58:52 -0400 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2023-09-02 13:54:38 +0800 |
commit | 2fcf852d5e6ccdfa15b4e91cfd9d570300e5f62a (patch) | |
tree | 9c1faf7ac626f8e4b975af45a9095f5657415559 | |
parent | 24f63dbc15deb93fd44fe785e148756883ace768 (diff) | |
download | xfstests-dev-2fcf852d5e6ccdfa15b4e91cfd9d570300e5f62a.tar.gz |
generic/*: add a check for security attrs
There are several generic tests that require "setcap", but don't check
whether the underlying fs supports security attrs. Add the appropriate
checks.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
-rwxr-xr-x | tests/generic/270 | 2 | ||||
-rwxr-xr-x | tests/generic/513 | 2 | ||||
-rwxr-xr-x | tests/generic/675 | 2 | ||||
-rwxr-xr-x | tests/generic/688 | 2 | ||||
-rwxr-xr-x | tests/generic/727 | 2 |
5 files changed, 10 insertions, 0 deletions
diff --git a/tests/generic/270 b/tests/generic/270 index 8a6a2822b7..e7329c2f32 100755 --- a/tests/generic/270 +++ b/tests/generic/270 @@ -13,6 +13,7 @@ _begin_fstest auto quota rw prealloc ioctl enospc stress # Import common functions. . ./common/filter . ./common/quota +. ./common/attr # Disable all sync operations to get higher load FSSTRESS_AVOID="$FSSTRESS_AVOID -ffsync=0 -fsync=0 -ffdatasync=0" @@ -58,6 +59,7 @@ _require_user _require_scratch _require_command "$KILLALL_PROG" killall _require_command "$SETCAP_PROG" setcap +_require_attrs security _scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1 _scratch_mount "-o usrquota,grpquota" diff --git a/tests/generic/513 b/tests/generic/513 index dc082787ae..7ff845cea3 100755 --- a/tests/generic/513 +++ b/tests/generic/513 @@ -12,12 +12,14 @@ _begin_fstest auto quick clone # Import common functions. . ./common/filter . ./common/reflink +. ./common/attr # real QA test starts here _supported_fs generic _require_scratch_reflink _require_command "$GETCAP_PROG" getcap _require_command "$SETCAP_PROG" setcap +_require_attrs security _scratch_mkfs >>$seqres.full 2>&1 _scratch_mount diff --git a/tests/generic/675 b/tests/generic/675 index 189251f20c..cc4309e45a 100755 --- a/tests/generic/675 +++ b/tests/generic/675 @@ -12,6 +12,7 @@ _begin_fstest auto clone quick # Import common functions. . ./common/filter . ./common/reflink +. ./common/attr # real QA test starts here @@ -21,6 +22,7 @@ _require_user _require_command "$GETCAP_PROG" getcap _require_command "$SETCAP_PROG" setcap _require_scratch_reflink +_require_attrs security _scratch_mkfs >> $seqres.full _scratch_mount diff --git a/tests/generic/688 b/tests/generic/688 index 426286b6c6..e2bf12b445 100755 --- a/tests/generic/688 +++ b/tests/generic/688 @@ -18,6 +18,7 @@ _cleanup() # Import common functions. . ./common/filter +. ./common/attr # real QA test starts here @@ -29,6 +30,7 @@ _require_command "$SETCAP_PROG" setcap _require_xfs_io_command falloc _require_test _require_congruent_file_oplen $TEST_DIR 65536 +_require_attrs security junk_dir=$TEST_DIR/$seq junk_file=$junk_dir/a diff --git a/tests/generic/727 b/tests/generic/727 index 58a89e3eda..2cda49eada 100755 --- a/tests/generic/727 +++ b/tests/generic/727 @@ -19,6 +19,7 @@ _begin_fstest auto fiexchange swapext quick # Import common functions. . ./common/filter +. ./common/attr # real QA test starts here @@ -30,6 +31,7 @@ _require_command "$SETCAP_PROG" setcap _require_xfs_io_command swapext '-v vfs -a' _require_xfs_io_command startupdate _require_scratch +_require_attrs security _scratch_mkfs >> $seqres.full _scratch_mount |