From: "Darrick J. Wong" <djwong@kernel.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: "Zorro Lang" <zlang@redhat.com>,
"Miklos Szeredi" <miklos@szeredi.hu>,
"Christian Brauner" <brauner@kernel.org>,
"André Almeida" <andrealmeid@igalia.com>,
linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 2/3] fstests: add helper _require_xfs_io_shutdown
Date: Tue, 10 Jun 2025 12:02:04 -0700 [thread overview]
Message-ID: <20250610190204.GG6179@frogsfrogsfrogs> (raw)
In-Reply-To: <CAOQ4uxiyAu7vkf1WK4f=FPOWLGT5iish4KpscqK=GpTAX6HSQw@mail.gmail.com>
On Tue, Jun 10, 2025 at 08:34:01PM +0200, Amir Goldstein wrote:
> On Tue, Jun 10, 2025 at 4:42 PM Darrick J. Wong <djwong@kernel.org> wrote:
> >
> > On Mon, Jun 09, 2025 at 05:19:14PM +0200, Amir Goldstein wrote:
> > > Requirements for tests that shutdown fs using "xfs_io -c shutdown".
> > > The requirements are stricter than the requirement for tests that
> > > shutdown fs using _scratch_shutdown helper.
> > >
> > > Generally, with overlay fs, tests can do _scratch_shutdown, but not
> > > xfs_io -c shutdown.
> > >
> > > Encode this stricter requirement in helper _require_xfs_io_shutdown
> > > and use it in test generic/623, to express that it cannot run on
> > > overalyfs.
> > >
> > > Reported-by: André Almeida <andrealmeid@igalia.com>
> > > Link: https://lore.kernel.org/linux-fsdevel/20250521-ovl_ro-v1-1-2350b1493d94@igalia.com/
> > > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> >
> > Makes sense to me, assuming you don't want to try to integrate the 'open
> > shutdown handle' dance into this test.
> >
> > ioargs=(-x -c "mmap 0 4k" -c "mwrite 0 4k")
> > case "$FSTYP" in
> > overlayfs)
> > ioargs+=(-c "open $(_scratch_shutdown_handle)" -c 'shutdown -f ' -c close)
> > ;;
> > *)
> > ioargs+=(-c shutdown)
> > ;;
> > esac
> > ioargs+=(-c fsync -c "mwrite 0 4k" $file)
> >
> > $XFS_IO_PROG "${ioargs[@]}" | _filter_xfs_io
> >
> > (Though I don't know if you actually tried that and it didn't work, or
> > maybe overlayfs mmap is weird, etc...)
>
> I did not try it.
> I had briefly considered trying and decided it's not worth it.
> overlayfs doesn't have an aops of its own, and mmap results in
> a memory map of the underlying file directly, so the test will essentially
> testing the base via overlayfs which does not add much test coverage.
>
> I do not object to making this test run on overlayfs, but I do wish to
> keep the helper around for future tests that will not do the dance.
<shrug> If fstests were written in a modern hipster language then
passing around a lambda would be easy and trivial...
...but this is bash.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> Thanks,
> Amir.
next prev parent reply other threads:[~2025-06-10 19:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 15:19 [PATCH 0/3] fstests overlay updates for 6.16-rc1 Amir Goldstein
2025-06-09 15:19 ` [PATCH 1/3] fstests: add helper _scratch_shutdown_and_syncfs Amir Goldstein
2025-06-10 14:37 ` Darrick J. Wong
2025-06-18 15:18 ` Zorro Lang
2025-06-09 15:19 ` [PATCH 2/3] fstests: add helper _require_xfs_io_shutdown Amir Goldstein
2025-06-09 20:20 ` André Almeida
2025-06-10 14:42 ` Darrick J. Wong
2025-06-10 18:34 ` Amir Goldstein
2025-06-10 19:02 ` Darrick J. Wong [this message]
2025-06-18 15:20 ` Zorro Lang
2025-06-09 15:19 ` [PATCH 3/3] overlay/08[89]: add tests for data-only redirect with userxattr Amir Goldstein
2025-06-18 16:02 ` Zorro Lang
2025-06-18 18:46 ` Amir Goldstein
2025-06-10 18:00 ` [PATCH 0/3] fstests overlay updates for 6.16-rc1 André Almeida
2025-06-10 18:25 ` Amir Goldstein
2025-06-18 14:56 ` Zorro Lang
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=20250610190204.GG6179@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=amir73il@gmail.com \
--cc=andrealmeid@igalia.com \
--cc=brauner@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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