test/lvol: use the run_test framework directly
Change-Id: Iabec093a7cd632cf35fb163cfcc0048ed66fc856 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477077 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
1fafd71bc3
commit
36ac0c4340
@ -28,6 +28,7 @@ function test_construct_lvs() {
|
||||
rpc_cmd bdev_lvol_delete_lvstore -u "$lvs_uuid"
|
||||
! rpc_cmd bdev_lvol_get_lvstores -u "$lvs_uuid"
|
||||
rpc_cmd bdev_malloc_delete "$malloc_name"
|
||||
check_leftover_devices
|
||||
}
|
||||
|
||||
# create lvs + lvol on top, verify lvol's parameters
|
||||
@ -66,6 +67,7 @@ function test_construct_lvol() {
|
||||
rpc_cmd bdev_lvol_delete_lvstore -u "$lvs_uuid"
|
||||
! rpc_cmd bdev_lvol_get_lvstores -u "$lvs_uuid"
|
||||
rpc_cmd bdev_malloc_delete "$malloc_name"
|
||||
check_leftover_devices
|
||||
}
|
||||
|
||||
# create lvs + multiple lvols, verify their params
|
||||
@ -127,6 +129,7 @@ function test_construct_multi_lvols() {
|
||||
rpc_cmd bdev_lvol_delete_lvstore -u "$lvs_uuid"
|
||||
! rpc_cmd bdev_lvol_get_lvstores -u "$lvs_uuid"
|
||||
rpc_cmd bdev_malloc_delete "$malloc_name"
|
||||
check_leftover_devices
|
||||
}
|
||||
|
||||
$rootdir/app/spdk_tgt/spdk_tgt &
|
||||
@ -134,9 +137,9 @@ spdk_pid=$!
|
||||
trap 'killprocess "$spdk_pid"; exit 1' SIGINT SIGTERM EXIT
|
||||
waitforlisten $spdk_pid
|
||||
|
||||
run_lvol_test test_construct_lvs
|
||||
run_lvol_test test_construct_lvol
|
||||
run_lvol_test test_construct_multi_lvols
|
||||
run_test "case" "test_construct_lvs" test_construct_lvs
|
||||
run_test "case" "test_construct_lvol" test_construct_lvol
|
||||
run_test "case" "test_construct_multi_lvols" test_construct_multi_lvols
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
killprocess $spdk_pid
|
||||
|
@ -10,9 +10,7 @@ function rpc_cmd() {
|
||||
$rootdir/scripts/rpc.py "$@"
|
||||
}
|
||||
|
||||
function run_lvol_test() {
|
||||
run_test suite "$*" "$@"
|
||||
|
||||
function check_leftover_devices() {
|
||||
leftover_bdevs=$(rpc_cmd bdev_get_bdevs)
|
||||
[ "$(jq length <<< "$leftover_bdevs")" == "0" ]
|
||||
leftover_lvs=$(rpc_cmd bdev_lvol_get_lvstores)
|
||||
|
Loading…
Reference in New Issue
Block a user