summaryrefslogtreecommitdiffstats
path: root/tests/ts/eject
diff options
context:
space:
mode:
authorKarel Zak2013-04-12 16:36:33 +0200
committerKarel Zak2013-04-12 16:36:33 +0200
commit618ec053fe2d1353eb1c15ebf98c1f4ef9b08ed1 (patch)
treee749c7c352768ed4492c1f6a3a2ed097d91bf9e2 /tests/ts/eject
parentlibmount: add debug message to guess FS function (diff)
downloadkernel-qcow2-util-linux-618ec053fe2d1353eb1c15ebf98c1f4ef9b08ed1.tar.gz
kernel-qcow2-util-linux-618ec053fe2d1353eb1c15ebf98c1f4ef9b08ed1.tar.xz
kernel-qcow2-util-linux-618ec053fe2d1353eb1c15ebf98c1f4ef9b08ed1.zip
tests: consolidate scsi_debug usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/eject')
-rwxr-xr-xtests/ts/eject/umount16
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/ts/eject/umount b/tests/ts/eject/umount
index 20f4e1238..3c1f84edf 100755
--- a/tests/ts/eject/umount
+++ b/tests/ts/eject/umount
@@ -12,22 +12,8 @@ ts_skip_nonroot
# not removable device.
#
-modprobe --dry-run --quiet scsi_debug
-[ "$?" == 0 ] || ts_skip "missing scsi_debug module"
-
-rmmod scsi_debug &> /dev/null
-
function init_device {
- modprobe scsi_debug dev_size_mb=100
- [ "$?" == 0 ] || ts_die "Cannot init device"
-
- sleep 3
-
- DEVNAME=$(grep scsi_debug /sys/block/*/device/model | awk -F '/' '{print $4}')
- [ "x${DEVNAME}" == "x" ] && ts_die "Cannot find device"
-
- echo "/dev/${DEVNAME}"
-
+ ts_scsi_debug_init dev_size_mb=100
}
function init_partitions {