test/json: Add pmem bdev test
Change-Id: I50a99f029f10f334370013627b75f61e7eecdcf5 Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/417557 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
4af4e4f509
commit
4a9583f7fe
@ -205,6 +205,7 @@ fi
|
|||||||
|
|
||||||
if [ $SPDK_TEST_PMDK -eq 1 ]; then
|
if [ $SPDK_TEST_PMDK -eq 1 ]; then
|
||||||
run_test ./test/pmem/pmem.sh -x
|
run_test ./test/pmem/pmem.sh -x
|
||||||
|
run_test ./test/pmem/json_config/json_config.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
timing_enter cleanup
|
timing_enter cleanup
|
||||||
|
@ -90,6 +90,16 @@ function remove_config_files_after_test_json_config() {
|
|||||||
rm $tmp_config $full_config $null_json_config
|
rm $tmp_config $full_config $null_json_config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function create_pmem_bdev_subsytem_config() {
|
||||||
|
$rpc_py create_pmem_pool /tmp/pool_file1 128 512
|
||||||
|
$rpc_py construct_pmem_bdev -n pmem1 /tmp/pool_file1
|
||||||
|
}
|
||||||
|
|
||||||
|
function clear_pmem_bdev_subsystem_config() {
|
||||||
|
$clear_config_py clear_config
|
||||||
|
$rpc_py delete_pmem_pool /tmp/pool_file1
|
||||||
|
}
|
||||||
|
|
||||||
function create_bdev_subsystem_config() {
|
function create_bdev_subsystem_config() {
|
||||||
$rpc_py construct_split_vbdev Nvme0n1 2
|
$rpc_py construct_split_vbdev Nvme0n1 2
|
||||||
$rpc_py construct_null_bdev Null0 32 512
|
$rpc_py construct_null_bdev Null0 32 512
|
||||||
|
25
test/pmem/json_config/json_config.sh
Executable file
25
test/pmem/json_config/json_config.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
VHOST_JSON_DIR=$(readlink -f $(dirname $0))
|
||||||
|
. $VHOST_JSON_DIR/../../json_config/common.sh
|
||||||
|
|
||||||
|
function test_subsystems() {
|
||||||
|
run_spdk_tgt
|
||||||
|
|
||||||
|
rpc_py="$spdk_rpc_py"
|
||||||
|
clear_config_py="$spdk_clear_config_py"
|
||||||
|
$rpc_py start_subsystem_init
|
||||||
|
|
||||||
|
create_pmem_bdev_subsytem_config
|
||||||
|
test_json_config
|
||||||
|
clear_pmem_bdev_subsystem_config
|
||||||
|
|
||||||
|
kill_targets
|
||||||
|
}
|
||||||
|
|
||||||
|
trap 'on_error_exit "${FUNCNAME}" "${LINENO}"' ERR
|
||||||
|
timing_enter json_config_pmem
|
||||||
|
|
||||||
|
test_subsystems
|
||||||
|
timing_exit json_config_pmem
|
||||||
|
report_test_completion json_config_pmem
|
Loading…
Reference in New Issue
Block a user