tests: skip if scsi_debug model file is not accessible
* do not print grep(1) info message * use ts_skip rather than ts_die when scsi_debug is useless Fixes: https://github.com/karelzak/util-linux/issues/1376 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
90a1baf9a7
commit
a0b07d9f2e
|
@ -966,9 +966,9 @@ function ts_scsi_debug_init {
|
|||
# wait for device if udevadm settle does not work
|
||||
for t in 0 0.02 0.05 0.1 1; do
|
||||
sleep $t
|
||||
devname=$(grep --with-filename scsi_debug /sys/block/*/device/model) && break
|
||||
devname=$(grep --no-messages --with-filename scsi_debug /sys/block/*/device/model) && break
|
||||
done
|
||||
[ -n "${devname}" ] || ts_die "timeout waiting for scsi_debug device"
|
||||
[ -n "${devname}" ] || ts_skip "timeout waiting for scsi_debug device"
|
||||
|
||||
devname=$(echo $devname | awk -F '/' '{print $4}')
|
||||
TS_DEVICE="/dev/${devname}"
|
||||
|
|
Loading…
Reference in New Issue