generic/645: notrun if FS doesn't have enough free inodes/blocks
PATCH v2 1/1 generic/645: notrun if FS doesn't have enough free inodes/blocks
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.
---
* 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(-)
tests/generic/645 +7 -1
@@ -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
Signature · 1 line
2.55.0
Quoted 8 lines · Ojaswin Mujoo
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.
Quoted 5 lines
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]>
Looks good to me,
--D
Quoted 34 lines
---
* 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(-)tests/generic/645 +7
-1@@ -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=$? exitSignature · 1 line
2.55.0
Quoted 8 lines · Ojaswin Mujoo
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.
Quoted 7 lines
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.
Quoted 29 lines
* 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(-)tests/generic/645 +7
-1@@ -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
Signature · 2 lines
Regards, Disha