diff options
author | Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> | 2022-02-18 16:31:55 +0900 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2022-02-21 01:01:19 +0800 |
commit | 1a7e6b57172d054823e7ea39110cf6dff1500065 (patch) | |
tree | 19951370b685c1957b08e96c9c86f311ebe40928 | |
parent | ba2dedfb6ad7452da1378d216310932d8254e718 (diff) | |
download | xfstests-dev-1a7e6b57172d054823e7ea39110cf6dff1500065.tar.gz |
xfs/015: check _scratch_mkfs_sized return code
The test cases xfs/015 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-x | tests/xfs/015 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/xfs/015 b/tests/xfs/015 index 86fa63367a..2bb7b8d509 100755 --- a/tests/xfs/015 +++ b/tests/xfs/015 @@ -43,7 +43,7 @@ _scratch_mount _require_fs_space $SCRATCH_MNT 131072 _scratch_unmount -_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw +_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed" cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs # get original data blocks number and agcount . $tmp.mkfs |