linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Zorro Lang <zlang@kernel.org>
Cc: Zorro Lang <zlang@redhat.com>,
	fstests@vger.kernel.org, linux-nfs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH fstests v2 2/3] generic/513: limit to filesystems that support capabilities
Date: Sun, 27 Aug 2023 09:43:41 -0400	[thread overview]
Message-ID: <45e9152ccb8afdced1c1f6887368fec59804c6d9.camel@kernel.org> (raw)
In-Reply-To: <20230827124512.23qnfe3keedrf4a2@zlang-mailbox>

On Sun, 2023-08-27 at 20:45 +0800, Zorro Lang wrote:
> On Fri, Aug 25, 2023 at 11:02:40AM -0400, Jeff Layton wrote:
> > On Fri, 2023-08-25 at 22:11 +0800, Zorro Lang wrote:
> > > On Thu, Aug 24, 2023 at 12:44:18PM -0400, Jeff Layton wrote:
> > > > This test requires being able to set file capabilities which some
> > > > filesystems (namely NFS) do not support. Add a _require_setcap test
> > > > and only run it on filesystems that pass it.
> > > > 
> > > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > > > ---
> > > >  common/rc         | 13 +++++++++++++
> > > >  tests/generic/513 |  1 +
> > > >  2 files changed, 14 insertions(+)
> > > > 
> > > > diff --git a/common/rc b/common/rc
> > > > index 5c4429ed0425..33e74d20c28b 100644
> > > > --- a/common/rc
> > > > +++ b/common/rc
> > > > @@ -5048,6 +5048,19 @@ _require_mknod()
> > > >  	rm -f $TEST_DIR/$seq.null
> > > >  }
> > > >  
> > > > +_require_setcap()
> > > > +{
> > > > +	local testfile=$TEST_DIR/setcaptest.$$
> > > > +
> > > > +	touch $testfile
> > > > +	$SETCAP_PROG "cap_sys_module=p" $testfile > $testfile.out 2>&1
> > > 
> > > Actually we talked about the capabilities checking helper last year, as below:
> > > 
> > > https://lore.kernel.org/fstests/20220323023845.saj5en74km7aibdx@zlang-mailbox/
> > > 
> > > As you bring this discussion back, how about the _require_capabilities() in
> > > above link?
> > > 
> > 
> > I was testing a similar patch, but your version looks better. Should I
> > drop mine and you re-post yours?
> 
> Actually we decided to use `_require_attrs security`, rather than a new
> _require_capabilities() helper. We need a chance/requirement to add
> that helper (when a test case really need it).
> 
> So I hope know is `_require_attrs security` enough for you? Or you really
> need a specific _require_capabilities helper?
> 
> Thanks,
> Zorro
> 
> 


Yeah, it looks like that should work:

    generic/513       [not run] attr namespace security not supported by this filesystem type: nfs

I'll plan to respin this patch to add that instead.

Thanks!
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2023-08-27 13:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 16:44 [PATCH fstests v2 0/3] fstests: add appropriate checks for fs features for some tests Jeff Layton
2023-08-24 16:44 ` [PATCH fstests v2 1/3] common/attr: fix the _require_acl test Jeff Layton
2023-08-24 16:44 ` [PATCH fstests v2 2/3] generic/513: limit to filesystems that support capabilities Jeff Layton
2023-08-25 14:11   ` Zorro Lang
2023-08-25 15:02     ` Jeff Layton
2023-08-27 12:45       ` Zorro Lang
2023-08-27 13:43         ` Jeff Layton [this message]
2023-08-28 14:35           ` Zorro Lang
2023-08-24 16:44 ` [PATCH fstests v2 3/3] generic/578: only run on filesystems that support FIEMAP Jeff Layton
2023-08-24 17:09   ` Darrick J. Wong
2023-08-24 17:28     ` Jeff Layton
2023-08-25 14:16       ` Zorro Lang
2023-08-25 14:57         ` Jeff Layton
2023-08-25 15:18           ` Darrick J. Wong
2023-08-25 17:34             ` Jeff Layton

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=45e9152ccb8afdced1c1f6887368fec59804c6d9.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=zlang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).