* [PATCH] generic/027: use 300M FS to accommodate XFS limits
@ 2024-04-10 7:07 David Disseldorp
2024-04-10 15:28 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: David Disseldorp @ 2024-04-10 7:07 UTC (permalink / raw)
To: fstests; +Cc: David Disseldorp
As of xfsprogs commit 6e0ed3d1 ("mkfs: stop allowing tiny filesystems")
attempts to create XFS filesystems sized under 300M fail.
Lacking MIN_FSSIZE configuration, failure of _scratch_mkfs_sized() in
generic/027 doesn't halt the test, leading _scratch_mount() to mount any
previously created (full-size) filesystem. As a result create_file()
may loop near-endlessly awaiting ENOSPC.
Use a 300M sized filesystem to support XFS' limit, and explicitly check
for _scratch_mkfs_sized() failure to avoid endless loops if the limit
changes again in future.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
tests/generic/027 | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/generic/027 b/tests/generic/027
index 47f1981d..4f8cf6d8 100755
--- a/tests/generic/027
+++ b/tests/generic/027
@@ -35,13 +35,14 @@ _require_scratch
echo "Silence is golden"
-_scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1
+_scratch_mkfs_sized $((300 * 1024 * 1024)) >>$seqres.full 2>&1 \
+ || _fail "_scratch_mkfs_sized failed"
_scratch_mount
echo "Reserve 2M space" >>$seqres.full
$XFS_IO_PROG -f -c "pwrite 0 2m" $SCRATCH_MNT/testfile >>$seqres.full 2>&1
echo "Fulfill the fs" >>$seqres.full
-$XFS_IO_PROG -f -c "pwrite 0 254m" $SCRATCH_MNT/bigfile >>$seqres.full 2>&1
+$XFS_IO_PROG -f -c "pwrite 0 298m" $SCRATCH_MNT/bigfile >>$seqres.full 2>&1
echo "Remove reserved file" >>$seqres.full
rm -f $SCRATCH_MNT/testfile
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] generic/027: use 300M FS to accommodate XFS limits
2024-04-10 7:07 [PATCH] generic/027: use 300M FS to accommodate XFS limits David Disseldorp
@ 2024-04-10 15:28 ` Darrick J. Wong
2024-04-11 1:53 ` David Disseldorp
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2024-04-10 15:28 UTC (permalink / raw)
To: David Disseldorp; +Cc: fstests
On Wed, Apr 10, 2024 at 05:07:20PM +1000, David Disseldorp wrote:
> As of xfsprogs commit 6e0ed3d1 ("mkfs: stop allowing tiny filesystems")
> attempts to create XFS filesystems sized under 300M fail.
>
> Lacking MIN_FSSIZE configuration, failure of _scratch_mkfs_sized() in
> generic/027 doesn't halt the test, leading _scratch_mount() to mount any
> previously created (full-size) filesystem. As a result create_file()
> may loop near-endlessly awaiting ENOSPC.
>
> Use a 300M sized filesystem to support XFS' limit, and explicitly check
> for _scratch_mkfs_sized() failure to avoid endless loops if the limit
> changes again in future.
Hmmm. Does your test environment export (as in, the bash keyword)
TEST_DEV and TEST_DIR? mkfs.xfs is supposed to detect fstests and allow
sub-300M filesystems for testing.
The detection breaks if TEST_{DEV,DIR} are set but not exported in the
config file; perhaps fstests ought to be exporting them like it does for
the <cough> other detection key.
--D
> Signed-off-by: David Disseldorp <ddiss@suse.de>
> ---
> tests/generic/027 | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/generic/027 b/tests/generic/027
> index 47f1981d..4f8cf6d8 100755
> --- a/tests/generic/027
> +++ b/tests/generic/027
> @@ -35,13 +35,14 @@ _require_scratch
>
> echo "Silence is golden"
>
> -_scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1
> +_scratch_mkfs_sized $((300 * 1024 * 1024)) >>$seqres.full 2>&1 \
> + || _fail "_scratch_mkfs_sized failed"
> _scratch_mount
>
> echo "Reserve 2M space" >>$seqres.full
> $XFS_IO_PROG -f -c "pwrite 0 2m" $SCRATCH_MNT/testfile >>$seqres.full 2>&1
> echo "Fulfill the fs" >>$seqres.full
> -$XFS_IO_PROG -f -c "pwrite 0 254m" $SCRATCH_MNT/bigfile >>$seqres.full 2>&1
> +$XFS_IO_PROG -f -c "pwrite 0 298m" $SCRATCH_MNT/bigfile >>$seqres.full 2>&1
> echo "Remove reserved file" >>$seqres.full
> rm -f $SCRATCH_MNT/testfile
>
> --
> 2.35.3
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] generic/027: use 300M FS to accommodate XFS limits
2024-04-10 15:28 ` Darrick J. Wong
@ 2024-04-11 1:53 ` David Disseldorp
0 siblings, 0 replies; 3+ messages in thread
From: David Disseldorp @ 2024-04-11 1:53 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests
On Wed, 10 Apr 2024 08:28:06 -0700, Darrick J. Wong wrote:
> On Wed, Apr 10, 2024 at 05:07:20PM +1000, David Disseldorp wrote:
> > As of xfsprogs commit 6e0ed3d1 ("mkfs: stop allowing tiny filesystems")
> > attempts to create XFS filesystems sized under 300M fail.
> >
> > Lacking MIN_FSSIZE configuration, failure of _scratch_mkfs_sized() in
> > generic/027 doesn't halt the test, leading _scratch_mount() to mount any
> > previously created (full-size) filesystem. As a result create_file()
> > may loop near-endlessly awaiting ENOSPC.
> >
> > Use a 300M sized filesystem to support XFS' limit, and explicitly check
> > for _scratch_mkfs_sized() failure to avoid endless loops if the limit
> > changes again in future.
>
> Hmmm. Does your test environment export (as in, the bash keyword)
> TEST_DEV and TEST_DIR? mkfs.xfs is supposed to detect fstests and allow
> sub-300M filesystems for testing.
Ah, I missed that getenv() logic in xfs_mkfs.
> The detection breaks if TEST_{DEV,DIR} are set but not exported in the
> config file; perhaps fstests ought to be exporting them like it does for
> the <cough> other detection key.
Yep, in my case I have a configs/$hostname.config environment and
common.config doesn't explicitly export TEST_DEV. I'll rework this
fix.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-11 1:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 7:07 [PATCH] generic/027: use 300M FS to accommodate XFS limits David Disseldorp
2024-04-10 15:28 ` Darrick J. Wong
2024-04-11 1:53 ` David Disseldorp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox