diff options
author | Karel Zak | 2013-04-12 16:36:33 +0200 |
---|---|---|
committer | Karel Zak | 2013-04-12 16:36:33 +0200 |
commit | 618ec053fe2d1353eb1c15ebf98c1f4ef9b08ed1 (patch) | |
tree | e749c7c352768ed4492c1f6a3a2ed097d91bf9e2 /tests/ts/mount | |
parent | libmount: add debug message to guess FS function (diff) | |
download | kernel-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/mount')
-rwxr-xr-x | tests/ts/mount/umount-alltargets | 16 | ||||
-rwxr-xr-x | tests/ts/mount/umount-recursive | 15 |
2 files changed, 2 insertions, 29 deletions
diff --git a/tests/ts/mount/umount-alltargets b/tests/ts/mount/umount-alltargets index 3c5731af0..1b09112d4 100755 --- a/tests/ts/mount/umount-alltargets +++ b/tests/ts/mount/umount-alltargets @@ -9,21 +9,7 @@ TS_DESC="umount-all-targets" ts_init "$*" ts_skip_nonroot -modprobe --dry-run --quiet scsi_debug -[ "$?" == 0 ] || ts_skip "missing scsi_debug module" - -ts_log "Init device" -$TS_CMD_UMOUNT --recursive $MOUNTPOINT &> /dev/null -rmmod scsi_debug &> /dev/null -modprobe scsi_debug dev_size_mb=50 -[ "$?" == 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" - -DEVICE="/dev/${DEVNAME}" +DEVICE=$(ts_scsi_debug_init dev_size_mb=50) ts_log "Create partitions" $TS_CMD_FDISK ${DEVICE} &> /dev/null <<EOF diff --git a/tests/ts/mount/umount-recursive b/tests/ts/mount/umount-recursive index 13a075f67..128df885a 100755 --- a/tests/ts/mount/umount-recursive +++ b/tests/ts/mount/umount-recursive @@ -9,21 +9,8 @@ TS_DESC="umount-recursive" ts_init "$*" ts_skip_nonroot -modprobe --dry-run --quiet scsi_debug -[ "$?" == 0 ] || ts_skip "missing scsi_debug module" - ts_log "Init device" -$TS_CMD_UMOUNT --recursive $MOUNTPOINT &> /dev/null -rmmod scsi_debug &> /dev/null -modprobe scsi_debug dev_size_mb=50 -[ "$?" == 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" - -DEVICE="/dev/${DEVNAME}" +DEVICE=$(ts_scsi_debug_init dev_size_mb=50) ts_log "Create partitions" $TS_CMD_FDISK ${DEVICE} &> /dev/null <<EOF |