]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: ts_scsi_debug_init() sleeps a bit earlier
authorRuediger Meier <ruediger.meier@ga-group.nl>
Sat, 28 Mar 2015 14:32:30 +0000 (15:32 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 29 Apr 2015 10:29:45 +0000 (12:29 +0200)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests/functions.sh

index 38ed03d55482b358a6a8abe7316245aa859fa15d..55b92738c6bff56e8eaed8b4dd895001598ba6a3 100644 (file)
@@ -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}"
 }