* [PATCH] generic/805: skip this test if we can't mount the filesystem
@ 2026-09-24 6:02 Darrick J. Wong
2026-09-24 11:38 ` Andrey Albershteyn
2026-09-25 4:58 ` Christoph Hellwig
0 siblings, 2 replies; 4+ messages in thread
From: Darrick J. Wong @ 2026-09-24 6:02 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, xfs
From: Darrick J. Wong <djwong@kernel.org>
This test doesn't work on filesystems with external devices (e.g. xfs
realtime) because the SCRATCH_DEV gets formatted with regular scratch fs
options but the filesystem is mounted with a bare _mount call, not
_scratch_mount. Since SCRATCH_DEV is not the dm-linear device created
earlier in the test, we can't really use that either.
In any case, if we can't mount the filesystem immediately after
formatting it, then we're not satisfying a test precondition. Change
the _fail to _notrun.
While we're at it, fix the cleanup function so that unmount failures
don't pollute the output.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/generic/805 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/generic/805 b/tests/generic/805
index ae498f5c669808..403d36d383a973 100755
--- a/tests/generic/805
+++ b/tests/generic/805
@@ -25,7 +25,7 @@ _cleanup()
{
xfs_freeze -u $SCRATCH_MNT 2>/dev/null
$DMSETUP_PROG resume $lvdev >> $seqres.full 2>&1
- _unmount -q $SCRATCH_MNT
+ _unmount -q $SCRATCH_MNT &>> $seqres.full
_dmsetup_remove $node
cd /
rm -f $tmp.*
@@ -47,7 +47,7 @@ table="0 $size_in_sector linear $SCRATCH_DEV 0"
_dmsetup_create $node --table "$table" || \
_fail "failed to create dm device"
-_mount $lvdev $SCRATCH_MNT || _fail "failed to mount dm device"
+_mount $lvdev $SCRATCH_MNT || _notrun "failed to mount dm device"
# Freeze the filesystem from userspace first, then nest a block device
# initiated freeze/thaw cycle inside it via dm suspend/resume.
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] generic/805: skip this test if we can't mount the filesystem
2026-09-24 6:02 [PATCH] generic/805: skip this test if we can't mount the filesystem Darrick J. Wong
@ 2026-09-24 11:38 ` Andrey Albershteyn
2026-09-25 4:58 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Andrey Albershteyn @ 2026-09-24 11:38 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Zorro Lang, fstests, xfs
On 2026-09-23 23:02:45, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> This test doesn't work on filesystems with external devices (e.g. xfs
> realtime) because the SCRATCH_DEV gets formatted with regular scratch fs
> options but the filesystem is mounted with a bare _mount call, not
> _scratch_mount. Since SCRATCH_DEV is not the dm-linear device created
> earlier in the test, we can't really use that either.
>
> In any case, if we can't mount the filesystem immediately after
> formatting it, then we're not satisfying a test precondition. Change
> the _fail to _notrun.
>
> While we're at it, fix the cleanup function so that unmount failures
> don't pollute the output.
>
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Looks good to me
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
--
- Andrey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] generic/805: skip this test if we can't mount the filesystem
2026-09-24 6:02 [PATCH] generic/805: skip this test if we can't mount the filesystem Darrick J. Wong
2026-09-24 11:38 ` Andrey Albershteyn
@ 2026-09-25 4:58 ` Christoph Hellwig
2026-09-25 14:49 ` Darrick J. Wong
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2026-09-25 4:58 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Zorro Lang, fstests, xfs
I think my version of this is better - we really should never
use the scratch helpers unless using a real scratch fs.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] generic/805: skip this test if we can't mount the filesystem
2026-09-25 4:58 ` Christoph Hellwig
@ 2026-09-25 14:49 ` Darrick J. Wong
0 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2026-09-25 14:49 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Zorro Lang, fstests, xfs
On Thu, Sep 24, 2026 at 09:58:09PM -0700, Christoph Hellwig wrote:
> I think my version of this is better - we really should never
> use the scratch helpers unless using a real scratch fs.
<nod> I think your patch works too, though if we can't _mkfs the
synthesized device then there's no point in continuing the test.
--D
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-25 14:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-24 6:02 [PATCH] generic/805: skip this test if we can't mount the filesystem Darrick J. Wong
2026-09-24 11:38 ` Andrey Albershteyn
2026-09-25 4:58 ` Christoph Hellwig
2026-09-25 14:49 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox