Skip to contentSkip to conversation

fstests: require scratch dev in tests using dm targets

PATCH In review Eryu Guan 2 participants 2 messages Sep 22, 2016

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 fstests: require scratch dev in tests using dm targets

We build dm device on top of scratch dev so we require $SCRATCH_DEV to be a valid block device in _require_dm_target(). And we need to _require_scratch before _require_dm_target, otherwise test fails if there's no SCRATCH_DEV defined, where it should _notrun.

+Usage: _require_block_device <dev>

So add _require_scratch_nocheck to generic/347 (we do the fs check on thinp device), move _require_scratch before _require_dm_target in xfs/006 and xfs/264.

---
 tests/generic/347 | 1 +
 tests/xfs/006     | 2 +-
 tests/xfs/264     | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
tests/generic/347 +1 -0
index 7e6b5e6..3adc674 100755
@@ -70,6 +70,7 @@ _workout()
 
 _supported_fs generic
 _supported_os Linux
+_require_scratch_nocheck
 _require_dm_target thin-pool
 
 _setup_thin
tests/xfs/006 +1 -1
index d8674f4..982a161 100755
@@ -49,8 +49,8 @@ rm -f $seqres.full
 # real QA test starts here
 _supported_fs xfs
 _supported_os Linux
-_require_dm_target error
 _require_scratch
+_require_dm_target error
 _require_fs_sysfs error/fail_at_unmount
 
 _scratch_mkfs > $seqres.full 2>&1
tests/xfs/264 +1 -1
index d3e920c..245b0ad 100755
@@ -49,8 +49,8 @@ rm -f $seqres.full
 # real QA test starts here
 _supported_fs xfs
 _supported_os Linux
-_require_dm_target error
 _require_scratch
+_require_dm_target error
 _require_fs_sysfs error/fail_at_unmount
 _require_fs_sysfs error/metadata/EIO/max_retries
 _require_fs_sysfs error/metadata/EIO/retry_timeout_seconds
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Eryu Guan

We build dm device on top of scratch dev so we require $SCRATCH_DEV to be a valid block device in _require_dm_target(). And we need to _require_scratch before _require_dm_target, otherwise test fails if there's no SCRATCH_DEV defined, where it should _notrun.

Quoted 7 lines

+Usage: _require_block_device <dev>

So add _require_scratch_nocheck to generic/347 (we do the fs check on thinp device), move _require_scratch before _require_dm_target in xfs/006 and xfs/264.

Looks good.

Signature · 2 lines
Dave Chinner
[email protected]