iscsi/test: destruct all malloc devices by one time

Just use a for loop, then we can delete all malloc
devices.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I34fb06c0d49333ab1b5bce0ea2e2b7ced7c50eb2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458045
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ziye Yang 2019-06-14 23:41:40 +08:00 committed by Darek Stojaczyk
parent 0c26ea5a2b
commit fd22bfcc2b

View File

@ -116,10 +116,13 @@ fio_pid=$!
sleep 3
# Delete raid0, Malloc0, Malloc1 blockdevs
# Delete raid0 blockdev
$rpc_py destroy_raid_bdev 'raid0'
$rpc_py delete_malloc_bdev 'Malloc0'
$rpc_py delete_malloc_bdev 'Malloc1'
# Delete all allocated malloc blockdevs
for malloc_bdev in $malloc_bdevs; do
$rpc_py delete_malloc_bdev $malloc_bdev
done
fio_status=0
wait $fio_pid || fio_status=$?