From: "Darrick J. Wong" <djwong@kernel.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: zlang@redhat.com, neal@gompa.dev, fstests@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
joannelkoong@gmail.com, bernd@bsbernd.com
Subject: Re: [PATCH 22/33] generic/631: don't run test if we can't mount overlayfs
Date: Thu, 6 Nov 2025 08:02:47 -0800 [thread overview]
Message-ID: <20251106160247.GH196391@frogsfrogsfrogs> (raw)
In-Reply-To: <CAOQ4uxhQt6LNo7QaN3rWy3eCeAS9r0xNcMW4ZvdrY5YgMbq66g@mail.gmail.com>
On Thu, Nov 06, 2025 at 10:23:04AM +0100, Amir Goldstein wrote:
> On Thu, Nov 6, 2025 at 12:12 AM Darrick J. Wong <djwong@kernel.org> wrote:
> >
> > On Thu, Oct 30, 2025 at 12:35:03PM +0100, Amir Goldstein wrote:
> > > On Tue, Oct 28, 2025 at 06:26:09PM -0700, Darrick J. Wong wrote:
> > > > From: Darrick J. Wong <djwong@kernel.org>
> > > >
> > > > This test fails on fuse2fs with the following:
> > > >
> > > > +mount: /opt/merged0: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error.
> > > > + dmesg(1) may have more information after failed mount system call.
> > > >
> > > > dmesg logs the following:
> > > >
> > > > [ 764.775172] overlayfs: upper fs does not support tmpfile.
> > > > [ 764.777707] overlayfs: upper fs does not support RENAME_WHITEOUT.
> > > >
> > > > From this, it's pretty clear why the test fails -- overlayfs checks that
> > > > the upper filesystem (fuse2fs) supports RENAME_WHITEOUT and O_TMPFILE.
> > > > fuse2fs doesn't support either of these, so the mount fails and then the
> > > > test goes wild.
> > > >
> > > > Instead of doing that, let's do an initial test mount with the same
> > > > options as the workers, and _notrun if that first mount doesn't succeed.
> > > >
> > > > Fixes: 210089cfa00315 ("generic: test a deadlock in xfs_rename when whiteing out files")
> > > > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > > > ---
> > > > tests/generic/631 | 22 ++++++++++++++++++++++
> > > > 1 file changed, 22 insertions(+)
> > > >
> > > >
> > > > diff --git a/tests/generic/631 b/tests/generic/631
> > > > index 72bf85e30bdd4b..64e2f911fdd10e 100755
> > > > --- a/tests/generic/631
> > > > +++ b/tests/generic/631
> > > > @@ -64,6 +64,26 @@ stop_workers() {
> > > > done
> > > > }
> > > >
> > > > +require_overlayfs() {
> > > > + local tag="check"
> > > > + local mergedir="$SCRATCH_MNT/merged$tag"
> > > > + local l="lowerdir=$SCRATCH_MNT/lowerdir:$SCRATCH_MNT/lowerdir1"
> > > > + local u="upperdir=$SCRATCH_MNT/upperdir$tag"
> > > > + local w="workdir=$SCRATCH_MNT/workdir$tag"
> > > > + local i="index=off"
> > > > +
> > > > + rm -rf $SCRATCH_MNT/merged$tag
> > > > + rm -rf $SCRATCH_MNT/upperdir$tag
> > > > + rm -rf $SCRATCH_MNT/workdir$tag
> > > > + mkdir $SCRATCH_MNT/merged$tag
> > > > + mkdir $SCRATCH_MNT/workdir$tag
> > > > + mkdir $SCRATCH_MNT/upperdir$tag
> > > > +
> > > > + _mount -t overlay overlay -o "$l,$u,$w,$i" $mergedir || \
> > > > + _notrun "cannot mount overlayfs"
> > > > + umount $mergedir
> > > > +}
> > > > +
> > > > worker() {
> > > > local tag="$1"
> > > > local mergedir="$SCRATCH_MNT/merged$tag"
> > > > @@ -91,6 +111,8 @@ worker() {
> > > > rm -f $SCRATCH_MNT/workers/$tag
> > > > }
> > > >
> > > > +require_overlayfs
> > > > +
> > > > for i in $(seq 0 $((4 + LOAD_FACTOR)) ); do
> > > > worker $i &
> > > > done
> > > >
> > >
> > > I agree in general, but please consider this (untested) cleaner patch
> >
> > Yes, this works too. Since this is your code, could you send it to the
> > list with a proper commit message (or even just copy mine) and then I
> > can ack it?
> >
>
> Attached.
> Now it's even tested.
>
> I put you down as Suggested-by.
> Feel free to choose your own roles...
>
> Thanks,
> Amir.
> From dc31352d6c926e0f6da6238eccbcaa96b1fb89c2 Mon Sep 17 00:00:00 2001
> From: Amir Goldstein <amir73il@gmail.com>
> Date: Thu, 30 Oct 2025 12:24:21 +0100
> Subject: [PATCH] generic/631: don't run test if we can't mount overlayfs
>
> This test fails on fuse2fs with the following:
>
> mount: /opt/merged0: wrong fs type, bad option, bad superblock on overlay,
> missing codepage or helper program, or other error.
> dmesg(1) may have more information after failed mount system call.
>
> dmesg logs the following:
>
> [ 764.775172] overlayfs: upper fs does not support tmpfile.
> [ 764.777707] overlayfs: upper fs does not support RENAME_WHITEOUT.
>
> From this, it's pretty clear why the test fails -- overlayfs checks that
> the upper filesystem (fuse2fs) supports RENAME_WHITEOUT and O_TMPFILE.
> fuse2fs doesn't support either of these, so the mount fails and then the
> test goes wild.
>
> Instead of doing that, let's do an initial test mount with the same
> options as the workers, and _notrun if that first mount doesn't succeed.
>
> Fixes: 210089cfa00315 ("generic: test a deadlock in xfs_rename when whiteing out files")
> Suggested-by: "Darrick J. Wong" <djwong@kernel.org>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Works for me,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> tests/generic/631 | 39 ++++++++++++++++++++++++++++-----------
> 1 file changed, 28 insertions(+), 11 deletions(-)
>
> diff --git a/tests/generic/631 b/tests/generic/631
> index c38ab771..7dc335aa 100755
> --- a/tests/generic/631
> +++ b/tests/generic/631
> @@ -46,7 +46,6 @@ _require_extra_fs overlay
>
> _scratch_mkfs >> $seqres.full
> _scratch_mount
> -_supports_filetype $SCRATCH_MNT || _notrun "overlayfs test requires d_type"
>
> mkdir $SCRATCH_MNT/lowerdir
> mkdir $SCRATCH_MNT/lowerdir1
> @@ -64,7 +63,7 @@ stop_workers() {
> done
> }
>
> -worker() {
> +mount_overlay() {
> local tag="$1"
> local mergedir="$SCRATCH_MNT/merged$tag"
> local l="lowerdir=$SCRATCH_MNT/lowerdir:$SCRATCH_MNT/lowerdir1"
> @@ -72,25 +71,43 @@ worker() {
> local w="workdir=$SCRATCH_MNT/workdir$tag"
> local i="index=off"
>
> + rm -rf $SCRATCH_MNT/merged$tag
> + rm -rf $SCRATCH_MNT/upperdir$tag
> + rm -rf $SCRATCH_MNT/workdir$tag
> + mkdir $SCRATCH_MNT/merged$tag
> + mkdir $SCRATCH_MNT/workdir$tag
> + mkdir $SCRATCH_MNT/upperdir$tag
> +
> + mount -t overlay overlay -o "$l,$u,$w,$i" "$mergedir"
> +}
> +
> +unmount_overlay() {
> + local tag="$1"
> + local mergedir="$SCRATCH_MNT/merged$tag"
> +
> + _unmount $mergedir
> +}
> +
> +worker() {
> + local tag="$1"
> + local mergedir="$SCRATCH_MNT/merged$tag"
> +
> touch $SCRATCH_MNT/workers/$tag
> while test -e $SCRATCH_MNT/running; do
> - rm -rf $SCRATCH_MNT/merged$tag
> - rm -rf $SCRATCH_MNT/upperdir$tag
> - rm -rf $SCRATCH_MNT/workdir$tag
> - mkdir $SCRATCH_MNT/merged$tag
> - mkdir $SCRATCH_MNT/workdir$tag
> - mkdir $SCRATCH_MNT/upperdir$tag
> -
> - mount -t overlay overlay -o "$l,$u,$w,$i" $mergedir
> + mount_overlay $tag
> mv $mergedir/etc/access.conf $mergedir/etc/access.conf.bak
> touch $mergedir/etc/access.conf
> mv $mergedir/etc/access.conf $mergedir/etc/access.conf.bak
> touch $mergedir/etc/access.conf
> - _unmount $mergedir
> + unmount_overlay $tag
> done
> rm -f $SCRATCH_MNT/workers/$tag
> }
>
> +mount_overlay check || \
> + _notrun "cannot mount overlayfs with underlying filesystem $FSTYP"
> +unmount_overlay check
> +
> for i in $(seq 0 $((4 + LOAD_FACTOR)) ); do
> worker $i &
> done
> --
> 2.51.1
>
next prev parent reply other threads:[~2025-11-06 16:02 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251029002755.GK6174@frogsfrogsfrogs>
2025-10-29 0:42 ` [PATCHSET v6] fstests: support ext4 fuse testing Darrick J. Wong
2025-10-29 1:20 ` [PATCH 01/33] misc: adapt tests to handle the fuse ext[234] drivers Darrick J. Wong
2025-10-30 9:51 ` Amir Goldstein
2025-11-05 22:53 ` Darrick J. Wong
2025-11-06 8:58 ` Amir Goldstein
2025-11-06 23:12 ` Darrick J. Wong
2025-11-07 7:50 ` Amir Goldstein
2025-11-07 7:08 ` Zorro Lang
2025-10-29 1:20 ` [PATCH 02/33] generic/740: don't run this test for fuse ext* implementations Darrick J. Wong
2025-10-30 9:59 ` Amir Goldstein
2025-11-05 22:56 ` Darrick J. Wong
2025-11-06 9:02 ` Amir Goldstein
2025-10-29 1:21 ` [PATCH 03/33] ext/052: use popdir.pl for much faster directory creation Darrick J. Wong
2025-10-29 1:21 ` [PATCH 04/33] common/rc: skip test if swapon doesn't work Darrick J. Wong
2025-11-12 6:35 ` Baokun Li
2025-11-12 18:26 ` Darrick J. Wong
2025-11-12 20:05 ` Theodore Ts'o
2025-11-12 22:29 ` [PATCH v6.1 " Darrick J. Wong
2025-11-13 1:51 ` Baokun Li
2025-11-13 15:52 ` Theodore Ts'o
2025-10-29 1:21 ` [PATCH 05/33] common/rc: streamline _scratch_remount Darrick J. Wong
2025-10-29 1:21 ` [PATCH 06/33] ext/039: require metadata journalling Darrick J. Wong
2025-10-29 1:22 ` [PATCH 07/33] populate: don't check for htree directories on fuse.ext4 Darrick J. Wong
2025-10-29 1:22 ` [PATCH 08/33] misc: convert _scratch_mount -o remount to _scratch_remount Darrick J. Wong
2025-10-29 1:22 ` [PATCH 09/33] misc: use explicitly $FSTYP'd mount calls Darrick J. Wong
2025-10-29 1:23 ` [PATCH 10/33] common/ext4: explicitly format with $FSTYP Darrick J. Wong
2025-10-29 1:23 ` [PATCH 11/33] tests/ext*: refactor open-coded _scratch_mkfs_sized calls Darrick J. Wong
2025-10-29 1:23 ` [PATCH 12/33] generic/732: disable for fuse.ext4 Darrick J. Wong
2025-10-29 1:23 ` [PATCH 13/33] defrag: fix ext4 defrag ioctl test Darrick J. Wong
2025-10-29 1:24 ` [PATCH 14/33] misc: explicitly require online resize support Darrick J. Wong
2025-10-29 1:24 ` [PATCH 15/33] ext4/004: disable for fuse2fs Darrick J. Wong
2025-10-29 1:24 ` [PATCH 16/33] generic/679: " Darrick J. Wong
2025-10-29 1:24 ` [PATCH 17/33] ext4/045: don't run the long dirent test on fuse2fs Darrick J. Wong
2025-10-29 1:25 ` [PATCH 18/33] generic/338: skip test if we can't mount with strictatime Darrick J. Wong
2025-10-29 1:25 ` [PATCH 19/33] generic/563: fuse doesn't support cgroup-aware writeback accounting Darrick J. Wong
2025-10-29 1:25 ` [PATCH 20/33] misc: use a larger buffer size for pwrites Darrick J. Wong
2025-10-29 1:25 ` [PATCH 21/33] ext4/046: don't run this test if dioread_nolock not supported Darrick J. Wong
2025-10-29 1:26 ` [PATCH 22/33] generic/631: don't run test if we can't mount overlayfs Darrick J. Wong
2025-10-30 11:35 ` Amir Goldstein
2025-11-05 23:12 ` Darrick J. Wong
2025-11-06 9:23 ` Amir Goldstein
2025-11-06 16:02 ` Darrick J. Wong [this message]
2025-10-29 1:26 ` [PATCH 23/33] generic/{409,410,411,589}: check for stacking mount support Darrick J. Wong
2025-10-30 10:25 ` Amir Goldstein
2025-11-05 22:58 ` Darrick J. Wong
2025-10-29 1:26 ` [PATCH 24/33] generic: add _require_hardlinks to tests that require hardlinks Darrick J. Wong
2025-10-29 1:26 ` [PATCH 25/33] ext4/001: check for fiemap support Darrick J. Wong
2025-10-29 1:27 ` [PATCH 26/33] generic/622: check that strictatime/lazytime actually work Darrick J. Wong
2025-10-29 1:27 ` [PATCH 27/33] generic/050: skip test because fuse2fs doesn't have stable output Darrick J. Wong
2025-10-30 10:05 ` Amir Goldstein
2025-11-05 23:02 ` Darrick J. Wong
2025-10-29 1:27 ` [PATCH 28/33] generic/405: don't stall on mkfs asking for input Darrick J. Wong
2025-10-29 1:27 ` [PATCH 29/33] ext4/006: fix this test Darrick J. Wong
2025-10-29 1:28 ` [PATCH 30/33] ext4/009: fix ENOSPC errors Darrick J. Wong
2025-10-29 1:28 ` [PATCH 31/33] ext4/022: enabl Darrick J. Wong
2025-10-29 6:03 ` Darrick J. Wong
2025-10-29 1:28 ` [PATCH 32/33] generic/730: adapt test for fuse filesystems Darrick J. Wong
2025-10-29 1:29 ` [PATCH 33/33] fuse2fs: hack around weird corruption problems Darrick J. Wong
2025-10-29 9:35 ` [PATCHSET v6] fstests: support ext4 fuse testing Christoph Hellwig
2025-10-29 23:52 ` 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=20251106160247.GH196391@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=amir73il@gmail.com \
--cc=bernd@bsbernd.com \
--cc=fstests@vger.kernel.org \
--cc=joannelkoong@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=neal@gompa.dev \
--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