diff options
author | Ruediger Meier | 2016-10-21 13:01:55 +0200 |
---|---|---|
committer | Ruediger Meier | 2016-10-21 15:08:49 +0200 |
commit | 5c711ba9453d46815b3c0ec677893a4a6f34d3bd (patch) | |
tree | a93d43859df367d64f982b7930343236b74afcc0 /tests/ts/partx/partx | |
parent | getopt: be sure that options array is terminated (diff) | |
download | kernel-qcow2-util-linux-5c711ba9453d46815b3c0ec677893a4a6f34d3bd.tar.gz kernel-qcow2-util-linux-5c711ba9453d46815b3c0ec677893a4a6f34d3bd.tar.xz kernel-qcow2-util-linux-5c711ba9453d46815b3c0ec677893a4a6f34d3bd.zip |
tests: consolidate rmmod scsi_debug
- auto cleanup on test exit
- Add smart timeout: Newer openSUSE systems on OBS failed to rmmod
almost always. udevadm settle does not seem to have any affect.
- now tests will fail if rmmod fails
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/partx/partx')
-rwxr-xr-x | tests/ts/partx/partx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx index 37990d8be..5b84afe24 100755 --- a/tests/ts/partx/partx +++ b/tests/ts/partx/partx @@ -59,8 +59,7 @@ $TS_CMD_DELPART ${TS_DEVICE} 1 [ "$?" == 0 ] && echo OK >> $TS_OUTPUT 2>&1 || ts_die "Unable to remove partition" >> $TS_OUTPUT 2>&1 ts_finalize_subtest -udevadm settle -rmmod scsi_debug &> /dev/null +ts_scsi_debug_rmmod # set global variable TS_DEVICE ts_scsi_debug_init dev_size_mb=50 num_parts=$PARTS @@ -135,6 +134,4 @@ $TS_CMD_PARTX -a --nr 0 $TS_DEVICE [ $(ls -d /sys/block/${DEVNAME}/${DEVNAME}* 2>/dev/null | wc -l) -eq $PARTS ] && echo "partitions added" >> $TS_OUTPUT 2>&1 || echo "Failed to add $TS_DEVICE partitions" >> $TS_OUTPUT 2>&1 ts_finalize_subtest -udevadm settle -rmmod scsi_debug ts_finalize |