summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorRuediger Meier2015-03-28 15:32:30 +0100
committerRuediger Meier2015-04-02 12:09:15 +0200
commit85fca7e5bc80e5b79e104a218d8ca0a906e3b4b0 (patch)
tree2a6e6f3e04e2c5d88de6bbd07eb6f186ce1d6bc4 /tests/functions.sh
parenttests: fix cramfs/mkfs for BE and different pagesizes (diff)
downloadkernel-qcow2-util-linux-85fca7e5bc80e5b79e104a218d8ca0a906e3b4b0.tar.gz
kernel-qcow2-util-linux-85fca7e5bc80e5b79e104a218d8ca0a906e3b4b0.tar.xz
kernel-qcow2-util-linux-85fca7e5bc80e5b79e104a218d8ca0a906e3b4b0.zip
tests: ts_scsi_debug_init() sleeps a bit earlier
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh8
1 files changed, 4 insertions, 4 deletions
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}"
}