mbox series

[0/7] fstests: fix _scratch_mkfs_sized failure handling

Message ID 20220207065541.232685-1-shinichiro.kawasaki@wdc.com (mailing list archive)
Headers show
Series fstests: fix _scratch_mkfs_sized failure handling | expand

Message

Shinichiro Kawasaki Feb. 7, 2022, 6:55 a.m. UTC
Let me repost again adding CC to ext4 and xfs lists, since the series includes
changes unique to those filesystems. Sorry for repeating same posts to fstests
list and btrfs list. Reviews and comments will be appreciated.


When generic/204 is run for btrfs-zoned filesystem on zoned block devices with
GB size order, it takes very long time to complete. The test case creates 115MiB
filesystem on the scratch device and fills files in it within decent run time.
However, with btrfs-zoned condition, the test case creates filesystem as large
as the device size and it takes very long time to fill it all. Three causes were
identified for the long run time, and this series addresses them.

The first cause is mixed mode option that _scratch_mkfs_sized helper function
adds to mkfs.btrfs. This option was added for both regular btrfs and
zoned-btrfs. However, zoned-btrfs does not support mixed mode. The mkfs with
mixed mode fails and results in _scratch_mkfs_sized failure. The mixed mode
shall not be specified for btrfs-zoned filesystem.

The second cause is no check of return code from _scratch_mkfs_sized. The test
case generic/204 calls both _scratch_mkfs and _scratch_mkfs_sized, and does not
check return code from them. If _scratch_mkfs succeeds and _scratch_mkfs_sized
fails, the scratch device still has valid filesystem created by _scratch_mkfs.
Following test workload can be executed without failure, but the filesystem
does not have the size specified for _scratch_mkfs_sized. The return code of
_scratch_mkfs_sized shall be checked to catch the mkfs failure.

The third cause is unnecessary call of the _scratch_mkfs helper function in the
test case generic/204. This helper function is called together with _filter_mkfs
helper function to obtain block size of the test target filesystem. However, the
_filter_mkfs function works only for xfs, and does nothing for other filesystems
including btrfs. Such preparation unique to xfs shall be done only for xfs.

In this series, the first patch addresses the first cause. Following three
patches address the second cause. They cover not only generic/204 but also
other test cases which have the same problem. The last three patches address the
third problem. Two of them are preparation patches to clarify that the function
_filter_mkfs is xfs unique. And the last patch modifies generic/204 so that xfs
unique test preparation are run only for xfs.

Shin'ichiro Kawasaki (7):
  common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized
  generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code
  ext4/021: check _scratch_mkfs_sized return code
  xfs/015: check _scratch_mkfs_sized return code
  common: rename _filter_mkfs to _xfs_filter_mkfs
  common: move _xfs_filter_mkfs from common/filter to common/xfs
  generic/204: do xfs unique preparation only for xfs

 common/attr       |  2 +-
 common/filter     | 53 -----------------------------------------------
 common/rc         |  8 +++----
 common/xfs        | 45 +++++++++++++++++++++++++++++++++++++++-
 tests/ext4/021    |  2 +-
 tests/generic/171 |  2 +-
 tests/generic/172 |  2 +-
 tests/generic/173 |  2 +-
 tests/generic/174 |  2 +-
 tests/generic/204 | 26 ++++++++++++++---------
 tests/xfs/004     |  2 +-
 tests/xfs/007     |  2 +-
 tests/xfs/010     |  2 +-
 tests/xfs/013     |  2 +-
 tests/xfs/015     |  4 ++--
 tests/xfs/016     |  2 +-
 tests/xfs/029     |  2 +-
 tests/xfs/030     |  2 +-
 tests/xfs/031     |  6 +++---
 tests/xfs/033     |  4 ++--
 tests/xfs/041     |  2 +-
 tests/xfs/044     |  2 +-
 tests/xfs/050     |  2 +-
 tests/xfs/052     |  2 +-
 tests/xfs/058     |  2 +-
 tests/xfs/067     |  2 +-
 tests/xfs/070     |  2 +-
 tests/xfs/071     |  2 +-
 tests/xfs/073     |  2 +-
 tests/xfs/076     |  2 +-
 tests/xfs/078     |  2 +-
 tests/xfs/092     |  2 +-
 tests/xfs/104     |  6 +++---
 tests/xfs/108     |  2 +-
 tests/xfs/109     |  2 +-
 tests/xfs/110     |  2 +-
 tests/xfs/111     |  2 +-
 tests/xfs/144     |  2 +-
 tests/xfs/153     |  2 +-
 tests/xfs/163     |  4 ++--
 tests/xfs/168     |  6 +++---
 tests/xfs/176     |  2 +-
 tests/xfs/178     |  2 +-
 tests/xfs/186     |  2 +-
 tests/xfs/189     |  2 +-
 tests/xfs/250     |  2 +-
 tests/xfs/259     |  2 +-
 tests/xfs/276     |  2 +-
 tests/xfs/279     |  2 +-
 tests/xfs/288     |  2 +-
 tests/xfs/292     |  4 ++--
 tests/xfs/299     |  4 ++--
 tests/xfs/335     |  2 +-
 tests/xfs/336     |  2 +-
 tests/xfs/337     |  2 +-
 tests/xfs/341     |  2 +-
 tests/xfs/342     |  2 +-
 tests/xfs/443     |  2 +-
 tests/xfs/448     |  2 +-
 tests/xfs/490     |  2 +-
 tests/xfs/502     |  2 +-
 tests/xfs/513     |  2 +-
 tests/xfs/530     |  2 +-
 tests/xfs/533     |  2 +-
 64 files changed, 135 insertions(+), 139 deletions(-)