mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
tests: drop extra scsi init
Use first test also for checking the support is there - avoid one extra unnecessary scsi_debug reload.
This commit is contained in:
parent
c90ee0414d
commit
7a588bce7b
@ -43,21 +43,17 @@ NUM_DEVS=1
|
|||||||
PER_DEV_SIZE=34
|
PER_DEV_SIZE=34
|
||||||
DEV_SIZE=$(($NUM_DEVS*$PER_DEV_SIZE))
|
DEV_SIZE=$(($NUM_DEVS*$PER_DEV_SIZE))
|
||||||
|
|
||||||
# Test that kernel supports topology
|
|
||||||
aux prepare_scsi_debug_dev $DEV_SIZE || skip
|
|
||||||
|
|
||||||
if [ ! -e /sys/block/$(basename $(< SCSI_DEBUG_DEV))/alignment_offset ] ; then
|
|
||||||
aux cleanup_scsi_debug_dev
|
|
||||||
skip
|
|
||||||
fi
|
|
||||||
aux cleanup_scsi_debug_dev
|
|
||||||
|
|
||||||
# ---------------------------------------------
|
# ---------------------------------------------
|
||||||
# Create "desktop-class" 4K drive
|
# Create "desktop-class" 4K drive
|
||||||
# (logical_block_size=512, physical_block_size=4096, alignment_offset=0):
|
# (logical_block_size=512, physical_block_size=4096, alignment_offset=0):
|
||||||
LOGICAL_BLOCK_SIZE=512
|
LOGICAL_BLOCK_SIZE=512
|
||||||
aux prepare_scsi_debug_dev $DEV_SIZE \
|
aux prepare_scsi_debug_dev $DEV_SIZE \
|
||||||
sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=3
|
sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=3
|
||||||
|
# Test that kernel supports topology
|
||||||
|
if [ ! -e /sys/block/$(basename $(< SCSI_DEBUG_DEV))/alignment_offset ] ; then
|
||||||
|
aux cleanup_scsi_debug_dev
|
||||||
|
skip
|
||||||
|
fi
|
||||||
check sysfs "$(< SCSI_DEBUG_DEV)" queue/logical_block_size $LOGICAL_BLOCK_SIZE
|
check sysfs "$(< SCSI_DEBUG_DEV)" queue/logical_block_size $LOGICAL_BLOCK_SIZE
|
||||||
aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE
|
aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE
|
||||||
get_devs
|
get_devs
|
||||||
|
Loading…
Reference in New Issue
Block a user