From: Ruediger Meier Date: Sat, 28 Mar 2015 14:32:30 +0000 (+0100) Subject: tests: ts_scsi_debug_init() sleeps a bit earlier X-Git-Tag: v2.26.2~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=293ff54d8808b0e2fd69a71497d5748ddec9b2fe;p=thirdparty%2Futil-linux.git tests: ts_scsi_debug_init() sleeps a bit earlier Signed-off-by: Ruediger Meier --- diff --git a/tests/functions.sh b/tests/functions.sh index 38ed03d554..55b92738c6 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -614,19 +614,19 @@ function ts_scsi_debug_init { modprobe -r scsi_debug &>/dev/null \ || ts_skip "cannot remove scsi_debug module (rmmod)" - modprobe -b scsi_debug $* &>/dev/null \ + modprobe -b scsi_debug "$@" &>/dev/null \ || ts_skip "cannot load scsi_debug module (modprobe)" # it might be still not loaded, modprobe.conf or whatever lsmod | grep -q "^scsi_debug " \ || ts_skip "scsi_debug module not loaded (lsmod)" - devname=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') - [ "x${devname}" == "x" ] && ts_die "cannot find scsi_debug device" - sleep 1 udevadm settle + devname=$(grep --with-filename scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}') + [ "x${devname}" == "x" ] && ts_die "cannot find scsi_debug device" + TS_DEVICE="/dev/${devname}" }