From: Amir Goldstein <amir73il@gmail.com>
To: Zorro Lang <zlang@redhat.com>
Cc: Brian Foster <bfoster@redhat.com>,
fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH] generic/623: fix test for runing on overlayfs
Date: Mon, 30 May 2022 14:29:05 +0300 [thread overview]
Message-ID: <20220530112905.79602-1-amir73il@gmail.com> (raw)
For this test to run on overlayfs we open a different file to perform
shutdown+fsync while keeping the writeback target file open.
We should probably perform fsync on the writeback target file, but
the bug is reproduced on xfs and overlayfs+xfs also as is.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
Zorro,
I tested that this test passes for both xfs and overlayfs+xfs on v5.18
and tested that both configs fail with the same warning on v5.10.109.
I tried changing fsync to syncfs for the test to be more correct in the
overlayfs case, but then golden output of xfs and overlayfs+xfs differ
and that would need some more output filtering (or disregarding output
completely).
Since this minimal change does the job and does not change test behavior
on xfs on any of the tested kernels, I thought it might be good enough.
Thanks,
Amir.
tests/generic/623 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/generic/623 b/tests/generic/623
index ea016d91..bb36ad25 100755
--- a/tests/generic/623
+++ b/tests/generic/623
@@ -24,10 +24,13 @@ _scratch_mount
# XFS had a regression where it failed to check shutdown status in the fault
# path. This produced an iomap warning because writeback failure clears Uptodate
# status on the page.
+# For this test to run on overlayfs we open a different file to perform
+# shutdown+fsync while keeping the writeback target file open.
file=$SCRATCH_MNT/file
$XFS_IO_PROG -fc "pwrite 0 4k" -c fsync $file | _filter_xfs_io
ulimit -c 0
-$XFS_IO_PROG -x -c "mmap 0 4k" -c "mwrite 0 4k" -c shutdown -c fsync \
+$XFS_IO_PROG -x -c "mmap 0 4k" -c "mwrite 0 4k" \
+ -c "open $(_scratch_shutdown_handle)" -c shutdown -c fsync \
-c "mwrite 0 4k" $file | _filter_xfs_io
# success, all done
--
2.25.1
next reply other threads:[~2022-05-30 11:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 11:29 Amir Goldstein [this message]
2022-05-30 13:29 ` [PATCH] generic/623: fix test for runing on overlayfs Zorro Lang
2022-05-30 16:17 ` Amir Goldstein
2022-05-30 21:58 ` Dave Chinner
2022-05-31 8:58 ` Zorro Lang
2022-05-31 9:42 ` Amir Goldstein
2022-06-01 6:26 ` Zorro Lang
2022-06-01 6:57 ` Amir Goldstein
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=20220530112905.79602-1-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=bfoster@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox