]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/146: require scratch dev and pool before _require_dm_target
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Wed, 8 Sep 2021 08:37:14 +0000 (17:37 +0900)
committerEryu Guan <guaneryu@gmail.com>
Sun, 12 Sep 2021 09:30:30 +0000 (17:30 +0800)
commitb2fdc58725be7c28242bc446887a85d55218f092
tree622104b3655da44156129336718e723bcb91503d
parent070bdc3cc4872f4e6f40210dffbb5c2cdc984a75
btrfs/146: require scratch dev and pool before _require_dm_target

The test case btrfs/146 calls _require_dm_target which depends on
SCRATCH_DEV. The test case assumes that valid devices are set in
SCRATCH_DEV_POOL, and one of the devices is propagated to
SCRATCH_DEV.  However, when SCRATCH_DEV_POOL is not set, valid value
is not propagated to SCRATCH_DEV and _require_dm_target causes
unexpected test case failure.

To avoid the failure, move _require_scratch and
_require_scratch_dev_pool calls before _require_dm_target call to
detect invalid SCRATCH_DEV_POOL beforehand.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/146