Test cases with dm_target shall call _require_scratch* before _require_dm_target. However, three test cases generic/628, generic/629 and btrfs/146 do not follow this rule and result in unexpected failures. The first patch in this series fixes the failures in generic/628 and generic/629. The second patch fixes it in btrfs/146. The last patch improves _require_dm_target to prevent the failure in the future test cases to be added. The failure was found with generic/628 and generic/629. I checked all existing test cases and found btrfs/146 also has the issue. Changes from v1: * Changed fix approach according to comment on the list * Added fix for btrfs/146 as the 2nd patch * Separated improvement in _require_dm_target as the last patch Shin'ichiro Kawasaki (3): generic/{628,629}: Fix order of _require_scratch* and _require_dm_target btrfs/146: Add _require_scratch_dev_pool before _require_dm_target common/rc: Check call order of _require_dm_target and _require_scratch* common/rc | 3 +++ tests/btrfs/146 | 1 + tests/generic/628 | 2 +- tests/generic/629 | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) -- 2.31.1