All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Eryu Guan <guaneryu@gmail.com>,
	Seth Forshee <sforshee@digitalocean.com>,
	Christoph Hellwig <hch@lst.de>, Peter Jin <peter@peterjin.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	fstests@vger.kernel.org, Amir Goldstein <amir73il@gmail.com>
Subject: Re: [PATCH] generic: add test for tmpfs POSIX ACLs
Date: Thu, 21 Apr 2022 09:05:13 +0200	[thread overview]
Message-ID: <20220421070513.wcqz7kzmcm3u5uok@wittgenstein> (raw)
In-Reply-To: <20220421054120.suxfy3y7za3mgkkg@zlang-mailbox>

On Thu, Apr 21, 2022 at 01:41:20PM +0800, Zorro Lang wrote:
> On Wed, Apr 20, 2022 at 07:52:22PM +0200, Christian Brauner wrote:
> > Add a regression test for commit 705191b03d50 ("fs: fix acl translation").
> > This tests whether setting POSIX ACLs on a tmpfs mounted in a
> > non-initial user and mount namespace works as expected.
> > 
> > Note, once again the idmapped mount testsuite is grossly misnamed at
> > this point. It has morphed into a full-blown generic vfs feature
> > testsuite.
> 
> Hi,
> 
> Good to know that, the idmapped-mounts things already been extended to 15k+
> lines[1] code, it's even much more than the unionmount-testsuite[2]. So I
> think it's time to think about shifting it from fstests/src to be an independent
> testsuit, we can learn what 35c7a37928fd ("overlay: run unionmount testsuite test
> cases") did, maintain idmapped-mounts testsuite outside, then let fstests to be a
> wrapper to run it.

I'd like to avoid that. The testsuite tests a lot of core vfs
functionality - completely indepenent of idmapped mounts which is why I
should rename it - that isn't covered anwywhere else in xfstests.
It also contains various regressions tests for core vfs work.
Let's keep it in a single repo which will guarantee us that it will be
run as part of xfstests.

Christian

> 
> 
> [1]
> $ wc -l src/idmapped-mounts/*.[ch]
>  14113 src/idmapped-mounts/idmapped-mounts.c
>    151 src/idmapped-mounts/missing.h
>    201 src/idmapped-mounts/mount-idmapped.c
>    425 src/idmapped-mounts/utils.c
>    130 src/idmapped-mounts/utils.h
>  15020 total
> 
> [2]
> https://github.com/amir73il/unionmount-testsuite
> 
> > 
> > Cc: Eryu Guan <guaneryu@gmail.com>
> > Cc: Seth Forshee <sforshee@digitalocean.com>
> > Cc: Christoph Hellwig <hch@lst.de>
> > Cc: Zorro Lang <zlang@redhat.com>
> > Cc: Linus Torvalds <torvalds@linux-foundation.org>
> > Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
> > ---
> > Hey,
> > 
> > As promised yesterday in
> > https://lore.kernel.org/linux-fsdevel/20220419131423.2367795-1-brauner@kernel.org
> > this adds a regression test to xfstests.
> > 
> > Thanks!
> > Christian
> > ---
> >  src/idmapped-mounts/idmapped-mounts.c | 140 +++++++++++++++++++++++++-
> >  tests/generic/683                     |  32 ++++++
> >  tests/generic/683.out                 |   2 +
> >  3 files changed, 173 insertions(+), 1 deletion(-)
> >  create mode 100755 tests/generic/683
> >  create mode 100644 tests/generic/683.out
> > 
> 
> [snip]
> 
> > diff --git a/tests/generic/683 b/tests/generic/683
> > new file mode 100755
> > index 00000000..397548ed
> > --- /dev/null
> > +++ b/tests/generic/683
> > @@ -0,0 +1,32 @@
> > +#! /bin/bash
> > +# SPDX-License-Identifier: GPL-2.0
> > +# Copyright (c) 2022 Christian Brauner (Microsoft).  All Rights Reserved.
> > +#
> > +# FS QA Test No. 683
> > +#
> > +# Test that setting POSIX ACLs in userns-mountable filesystems works.
> > +#
> > +# Regression test for commit:
> > +#
> > +# 705191b03d50 ("fs: fix acl translation")
> > +#
> > +. ./common/preamble
> > +_begin_fstest auto quick perms
> > +
> > +# Import common functions.
> > +. ./common/filter
> > +
> > +# real QA test starts here
> > +
> > +_supported_fs generic
> > +_require_test
> 
> Better to have _require_idmapped_mounts at here. I'd like to leave idmapped-mounts.c
> part for vfs reviewing.
> 
> Thanks for this new testing coverage,
> Zorro
> 
> > +_require_user fsgqa
> > +_require_group fsgqa
> > +
> > +echo "Silence is golden"
> > +
> > +$here/src/idmapped-mounts/idmapped-mounts --test-setxattr-fix-705191b03d50 \
> > +	--device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP"
> > +
> > +status=$?
> > +exit
> > diff --git a/tests/generic/683.out b/tests/generic/683.out
> > new file mode 100644
> > index 00000000..7f2a2ace
> > --- /dev/null
> > +++ b/tests/generic/683.out
> > @@ -0,0 +1,2 @@
> > +QA output created by 683
> > +Silence is golden
> > 
> > base-commit: fbc6486be09c93a68d3863ebf7e3ed851fc4721c
> > -- 
> > 2.32.0
> > 
> 

  reply	other threads:[~2022-04-21  7:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 13:14 [PATCH] fs: fix acl translation Christian Brauner
2022-04-20 17:52 ` [PATCH] generic: add test for tmpfs POSIX ACLs Christian Brauner
2022-04-21  5:41   ` Zorro Lang
2022-04-21  7:05     ` Christian Brauner [this message]
2022-04-21  7:18       ` Christoph Hellwig
2022-04-21  7:52         ` Amir Goldstein
2022-04-21  7:55           ` Christoph Hellwig
2022-04-21  8:59     ` Dave Chinner
2022-04-21 15:35       ` Zorro Lang
2022-04-21 15:37         ` Christoph Hellwig
2022-04-21 15:53           ` Christian Brauner
2022-04-23  7:17             ` Amir Goldstein
2022-04-23 11:07               ` Christian Brauner

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=20220421070513.wcqz7kzmcm3u5uok@wittgenstein \
    --to=brauner@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=hch@lst.de \
    --cc=peter@peterjin.org \
    --cc=sforshee@digitalocean.com \
    --cc=torvalds@linux-foundation.org \
    /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.