mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: check scsi_debug support opt_blks
Some older kernels (i.e. lenny) do not have such options.
This commit is contained in:
parent
035276ab83
commit
8fdca0de79
@ -320,6 +320,7 @@ prepare_scsi_debug_dev() {
|
|||||||
local DEV_SIZE=$1
|
local DEV_SIZE=$1
|
||||||
local SCSI_DEBUG_PARAMS=${@:2}
|
local SCSI_DEBUG_PARAMS=${@:2}
|
||||||
|
|
||||||
|
rm -f debug.log strace.log
|
||||||
test ! -f "SCSI_DEBUG_DEV" || return 0
|
test ! -f "SCSI_DEBUG_DEV" || return 0
|
||||||
test -z "$LOOP"
|
test -z "$LOOP"
|
||||||
test -n "$DM_DEV_DIR"
|
test -n "$DM_DEV_DIR"
|
||||||
@ -331,6 +332,7 @@ prepare_scsi_debug_dev() {
|
|||||||
# Create the scsi_debug device and determine the new scsi device's name
|
# Create the scsi_debug device and determine the new scsi device's name
|
||||||
# NOTE: it will _never_ make sense to pass num_tgts param;
|
# NOTE: it will _never_ make sense to pass num_tgts param;
|
||||||
# last param wins.. so num_tgts=1 is imposed
|
# last param wins.. so num_tgts=1 is imposed
|
||||||
|
touch SCSI_DEBUG_DEV
|
||||||
modprobe scsi_debug dev_size_mb=$DEV_SIZE $SCSI_DEBUG_PARAMS num_tgts=1 || skip
|
modprobe scsi_debug dev_size_mb=$DEV_SIZE $SCSI_DEBUG_PARAMS num_tgts=1 || skip
|
||||||
sleep 2 # allow for async Linux SCSI device registration
|
sleep 2 # allow for async Linux SCSI device registration
|
||||||
|
|
||||||
|
@ -96,6 +96,9 @@ vgremove $vg
|
|||||||
|
|
||||||
aux cleanup_scsi_debug_dev
|
aux cleanup_scsi_debug_dev
|
||||||
|
|
||||||
|
# scsi_debug option opt_blks appeared in Oct 2010
|
||||||
|
aux kernel_at_least 2 6 37 || exit 0
|
||||||
|
|
||||||
# ---------------------------------------------
|
# ---------------------------------------------
|
||||||
# Create "enterprise-class" 512 drive w/ HW raid stripe_size = 768K
|
# Create "enterprise-class" 512 drive w/ HW raid stripe_size = 768K
|
||||||
# (logical_block_size=512, physical_block_size=512, alignment_offset=0):
|
# (logical_block_size=512, physical_block_size=512, alignment_offset=0):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user