From: Eryu Guan Date: Fri, 1 Jul 2016 03:08:41 +0000 (+0800) Subject: generic: add _require_block_device to more tests X-Git-Tag: v2022.05.01~2434 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2caf9a321867662dc195bef5fa214a03ba8fd070;p=users%2Fhch%2Fxfstests-dev.git generic: add _require_block_device to more tests 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 Signed-off-by: Eryu Guan --- diff --git a/tests/generic/067 b/tests/generic/067 index 8a7a55c13..8f2baf573 100755 --- a/tests/generic/067 +++ b/tests/generic/067 @@ -56,6 +56,7 @@ _require_test_symlinks _require_test _require_scratch _require_loop +_require_block_device $SCRATCH_DEV rm -f $seqres.full diff --git a/tests/generic/299 b/tests/generic/299 index 40265c8ce..c9ed0e059 100755 --- a/tests/generic/299 +++ b/tests/generic/299 @@ -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` diff --git a/tests/generic/300 b/tests/generic/300 index c187f43d2..181594eca 100755 --- a/tests/generic/300 +++ b/tests/generic/300 @@ -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