From 85fca7e5bc80e5b79e104a218d8ca0a906e3b4b0 Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Sat, 28 Mar 2015 15:32:30 +0100 Subject: tests: ts_scsi_debug_init() sleeps a bit earlier Signed-off-by: Ruediger Meier --- tests/functions.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/functions.sh') diff --git a/tests/functions.sh b/tests/functions.sh index 38ed03d55..55b92738c 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}" } -- cgit v1.2.3-55-g7522