All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: fstests@vger.kernel.org
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Darrick Wong <djwong@kernel.org>, Zorro Lang <zlang@redhat.com>,
	Jeff Layton <jlayton@kernel.org>
Subject: [PATCH fstests v4 3/3] generic/*: add a check for security attrs
Date: Wed, 30 Aug 2023 06:58:52 -0400	[thread overview]
Message-ID: <20230830-fixes-v4-3-88d7b8572aa3@kernel.org> (raw)
In-Reply-To: <20230830-fixes-v4-0-88d7b8572aa3@kernel.org>

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>
---
 tests/generic/270 | 2 ++
 tests/generic/513 | 2 ++
 tests/generic/675 | 2 ++
 tests/generic/688 | 2 ++
 tests/generic/727 | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/tests/generic/270 b/tests/generic/270
index 8a6a2822b76b..e7329c2f3280 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 dc082787ae4e..7ff845cea35b 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 189251f20c0d..cc4309e45a04 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 426286b6c6ce..e2bf12b4457d 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 58a89e3eda70..2cda49eadab3 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

-- 
2.41.0


  parent reply	other threads:[~2023-08-30 18:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 10:58 [PATCH fstests v4 0/3] fstests: add appropriate checks for fs features for some tests Jeff Layton
2023-08-30 10:58 ` [PATCH fstests v4 1/3] common/attr: fix the _require_acl test Jeff Layton
2023-08-30 15:02   ` Darrick J. Wong
2023-08-30 10:58 ` [PATCH fstests v4 2/3] generic/578: add a check to ensure that fiemap is supported Jeff Layton
2023-08-30 14:59   ` Darrick J. Wong
2023-08-30 10:58 ` Jeff Layton [this message]
2023-08-30 15:01   ` [PATCH fstests v4 3/3] generic/*: add a check for security attrs Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230830-fixes-v4-3-88d7b8572aa3@kernel.org \
    --to=jlayton@kernel.org \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=zlang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.