test/iscsi: don't use set +e
We used `set +e` before bdev deletion RPCs and `wait $fio_pid`. Disabling errors from those RPCs doesn't make sense. We expect FIO to fail due to bdev hotremoval, but the bdev hotremoval itself must succeed. Besides, it's easy to forget to undo `set +e` so don't use it. For `wait` we can use the following paradigm instead: ``` rc=0 wait $pid || rc=$? ``` Change-Id: I8716bd861eae85d7a8590d4bd26a65cfa10e0dc1 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457469 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
1a8ee925b0
commit
4cc2d1d814
@ -114,25 +114,23 @@ $fio_py -p iscsi -i 1048576 -d 128 -t rw -r 10 &
|
||||
fio_pid=$!
|
||||
|
||||
sleep 3
|
||||
set +e
|
||||
|
||||
# Delete raid0, Malloc0, Malloc1 blockdevs
|
||||
$rpc_py destroy_raid_bdev 'raid0'
|
||||
$rpc_py delete_malloc_bdev 'Malloc0'
|
||||
$rpc_py delete_malloc_bdev 'Malloc1'
|
||||
|
||||
wait $fio_pid
|
||||
fio_status=$?
|
||||
fio_status=0
|
||||
wait $fio_pid || fio_status=$?
|
||||
|
||||
|
||||
if [ $fio_status -eq 0 ]; then
|
||||
echo "iscsi hotplug test: fio successful - expected failure"
|
||||
set -e
|
||||
exit 1
|
||||
else
|
||||
echo "iscsi hotplug test: fio failed as expected"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
iscsicleanup
|
||||
$rpc_py delete_target_node 'iqn.2016-06.io.spdk:Target3'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user