generic: add _require_block_device to more tests
authorEryu Guan <eguan@redhat.com>
Fri, 1 Jul 2016 03:08:41 +0000 (11:08 +0800)
committerEryu Guan <eguan@redhat.com>
Sat, 16 Jul 2016 09:34:57 +0000 (17:34 +0800)
generic/067 mounts $SCRATCH_DEV directly in the test, assuming it's
a block device. generic/299 and generic/300 query the size of
$SCRATCH_DEV by running 'blockdev --getsz $SCRATCH_DEV'.

So add the check to make sure $SCRATCH_DEV is a real block device in
these tests.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/067
tests/generic/299
tests/generic/300

index 8a7a55c1386a45de72106a5d682b634a2c953222..8f2baf5733e110a724818c1aa8606ac29e4b10ba 100755 (executable)
@@ -56,6 +56,7 @@ _require_test_symlinks
 _require_test
 _require_scratch
 _require_loop
+_require_block_device $SCRATCH_DEV
 
 rm -f $seqres.full
 
index 40265c8ce5787eeb58ab93ba00c36dcc105b2e61..c9ed0e0599eeecab43cecccac94943437d4a03d0 100755 (executable)
@@ -43,6 +43,7 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 _require_odirect
+_require_block_device $SCRATCH_DEV
 
 NUM_JOBS=$((4*LOAD_FACTOR))
 BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
index c187f43d2ab8b01313b73f00ff1779b55035e31a..181594eca22614c907add0da8570a7221e9068e5 100755 (executable)
@@ -43,6 +43,7 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 _require_odirect
+_require_block_device $SCRATCH_DEV
 
 # xfs_io is not required for this test, but it's the best way to verify
 # the test system supports fallocate() for allocation and hole punching