Thread (5 messages) 5 messages, 3 authors, 2021-08-01

Re: [PATCH] fstests: generic/204: fail if the mkfs fails

From: Eryu Guan <hidden>
Date: 2021-08-01 12:42:16
Also in: fstests

On Thu, Jul 29, 2021 at 04:35:53PM -0400, Josef Bacik wrote:
My nightly fstests runs on my Raspberry Pi got stuck trying to run
generic/204.  This boiled down to mkfs failing to make the scratch
device that small with the subpage blocksize support, and thus trying to
fill a 1tib drive with tiny files.  On one hand I'd like to make
So the underlying disk is 1TB in size, and we ended up using this 1T
filesystem when _scratch_mkfs_sized failed?

But we have done _try_wipe_scratch_devs before each test to make sure we
don't use previous scratch dev accidently (just like this case), and the
subsesquent _scratch_mount will fail and fail the whole test. So it's
not clear to me what caused the failure you hit.

Thanks,
Eryu
quoted hunk ↗ jump to hunk
_scratch_mkfs failures automatically fail the test, but I worry about
cases where a test may be checking for an option and need to do
something different with failures, so for now simply fail if we can't
make our tiny-fs in generic/204.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 tests/generic/204 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/generic/204 b/tests/generic/204
index a3dabb71..b5deb443 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -35,7 +35,8 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
 [ $FSTYP = "xfs" ] && MKFS_OPTIONS="$MKFS_OPTIONS -l size=16m -i maxpct=50"
 
 SIZE=`expr 115 \* 1024 \* 1024`
-_scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw
+_scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
+	|| _fail "mkfs failed"
 cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null
 _scratch_mount
 
-- 
2.26.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help