aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>2022-02-18 16:31:54 +0900
committerEryu Guan <guaneryu@gmail.com>2022-02-21 01:01:14 +0800
commitba2dedfb6ad7452da1378d216310932d8254e718 (patch)
tree948f55ca8fbdad84d47a2fae8d91a41063c5cc21
parent85a48b27b0e0f17a779426e43565e693e5e11bb7 (diff)
downloadxfstests-dev-ba2dedfb6ad7452da1378d216310932d8254e718.tar.gz
ext4/021: check _scratch_mkfs_sized return code
The test cases ext4/021 calls _scratch_mkfs before _scratch_mkfs_sized, and does not check return code of _scratch_mkfs_sized. Even if _scratch_mkfs_sized failed, _scratch_mount after it cannot detect the sized mkfs failure because _scratch_mkfs already created a file system on the device. This results in unexpected test condition. To avoid the unexpected test condition, check return code of _scratch_mkfs_sized. Suggested-by: Naohiro Aota <naohiro.aota@wdc.com> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-xtests/ext4/0212
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ext4/021 b/tests/ext4/021
index 62768c60bb..a9277abf64 100755
--- a/tests/ext4/021
+++ b/tests/ext4/021
@@ -24,7 +24,7 @@ _scratch_unmount
# With 4k block size, this amounts to 10M FS instance.
fssize=$((2560 * $blocksize))
-_scratch_mkfs_sized $fssize >> $seqres.full 2>&1
+_scratch_mkfs_sized $fssize >> $seqres.full 2>&1 || _fail "mkfs failed"
_require_metadata_journaling $SCRATCH_DEV
offset=0