On Tue, Jun 03, 2025 at 12:07:43PM +0200, Amir Goldstein wrote: > This test performs shutdown via xfs_io -c shutdown. > > Overlayfs tests can use _scratch_shutdown, but they cannot use > "-c shutdown" xfs_io command without jumping through hoops, so by > default we do not support it. > > Add this condition to _require_xfs_io_command and add the require > statement to test generic/623 so it wont run with overlayfs. > > Reported-by: André Almeida <andrealmeid@xxxxxxxxxx> > Tested-by: André Almeida <andrealmeid@xxxxxxxxxx> > Link: https://lore.kernel.org/linux-fsdevel/20250521-ovl_ro-v1-1-2350b1493d94@xxxxxxxxxx/ > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > --- > common/rc | 8 ++++++++ > tests/generic/623 | 1 + > 2 files changed, 9 insertions(+) > > diff --git a/common/rc b/common/rc > index d8ee8328..bffd576a 100644 > --- a/common/rc > +++ b/common/rc > @@ -3033,6 +3033,14 @@ _require_xfs_io_command() > touch $testfile > testio=`$XFS_IO_PROG -c "syncfs" $testfile 2>&1` > ;; > + "shutdown") > + if [ $FSTYP = "overlay" ]; then > + # Overlayfs tests can use _scratch_shutdown, but they > + # cannot use "-c shutdown" xfs_io command without jumping > + # through hoops, so by default we do not support it. > + _notrun "xfs_io $command not supported on $FSTYP" > + fi > + ;; Hmm... I'm not sure this's a good way. For example, overlay/087 does xfs_io shutdown too, generally it should calls _require_xfs_io_command "shutdown" although it doesn't. If someone overlay test case hope to test as o/087 does, and it calls _require_xfs_io_command "shutdown", then it'll be _notrun. If g/623 is not suitable for overlay, how about skip it for overlay clearly, by `_exclude_fs overlay` ? Thanks, Zorro > *) > testio=`$XFS_IO_PROG -c "help $command" 2>&1` > esac > diff --git a/tests/generic/623 b/tests/generic/623 > index b97e2adb..4e36daaf 100755 > --- a/tests/generic/623 > +++ b/tests/generic/623 > @@ -16,6 +16,7 @@ _begin_fstest auto quick shutdown mmap > > _require_scratch_nocheck > _require_scratch_shutdown > +_require_xfs_io_command "shutdown" > > _scratch_mkfs &>> $seqres.full > _scratch_mount > -- > 2.34.1 >