Re: [PATCH v2] generic/645: notrun if FS doesn't have enough free inodes/blocks

Disha Goel <[email protected]> Fri, 31 Jul 2026 16:56:45 +0530
Newsgroups org.kernel.vger.fstests
Message-ID <[email protected]>
On 30/07/26 10:52 pm, Ojaswin Mujoo wrote:
> When running generic/645 with ext4 using 64k block size + bigalloc, the
> test fails with ENOSPC because the filesystem runs out of inodes before
> the test completes.
> 
> The test creates approximately 10,001 files, however, in this particular
> configuration a standard 5G FS only has around ~5100 inodes resulting in
> the ENOSPC failure.
> 
> Parse vfstest output to notrun the test incase we encounter this ENOSPC
> instead of reporting it as a failure.
> 
> Reported-by: Disha Goel <[email protected]>
> Signed-off-by: Ojaswin Mujoo <[email protected]>
> ---
> 
Tested with ext4 + 64k block size + bigalloc on a 9G filesystem.
generic/645 now correctly notruns instead of failing with ENOSPC.

Tested-by: Disha Goel <[email protected]>

> * Changes since v1 [1] *
> 
> - Instead of using a helper, check for ENOSPC in vfstest output
>    (Thanks for Darrick for suggestion)
> 
> 
> [1] https://lore.kernel.org/fstests/[email protected]/
>   tests/generic/645 | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/generic/645 b/tests/generic/645
> index d6eb75e6..6498efe1 100755
> --- a/tests/generic/645
> +++ b/tests/generic/645
> @@ -22,7 +22,13 @@ _wants_kernel_commit dacfd001eaf2 \
>   echo "Silence is golden"
>   
>   $here/src/vfs/vfstest --test-nested-userns \
> -	--device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP"
> +	--device "$TEST_DEV" --mount "$TEST_DIR" --fstype "$FSTYP" \
> +	> $tmp.vfstest 2>&1
>   
> +if grep -q "No space left on device" $tmp.vfstest; then
> +	_notrun "$TEST_DEV ran out of free blocks/inodes"
> +fi
> +
> +cat $tmp.vfstest
>   status=$?
>   exit

-- 
Regards,
Disha