test/spdkcli: Test for pmem bdev.
Change-Id: I1917ca3002f34b90d74ce360987fc63b3064a20f Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/417855 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> 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: Seth Howell <seth.howell5141@gmail.com>
This commit is contained in:
parent
46f60d43f1
commit
dcca82c109
@ -222,6 +222,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
|
run_test ./test/pmem/json_config/json_config.sh
|
||||||
|
run_test ./test/spdkcli/pmem.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $SPDK_TEST_RBD -eq 1 ]; then
|
if [ $SPDK_TEST_RBD -eq 1 ]; then
|
||||||
|
@ -9,7 +9,7 @@ spdkcli_job="python3 $SPDKCLI_BUILD_DIR/test/spdkcli/spdkcli_job.py"
|
|||||||
function on_error_exit() {
|
function on_error_exit() {
|
||||||
set +e
|
set +e
|
||||||
killprocess $spdk_tgt_pid
|
killprocess $spdk_tgt_pid
|
||||||
rm -f $testdir/${MATCH_FILE} $testdir/match_files/spdkcli_details_vhost.test /tmp/sample_aio
|
rm -f $testdir/${MATCH_FILE} $testdir/match_files/spdkcli_details_vhost.test /tmp/sample_aio /tmp/sample_pmem
|
||||||
print_backtrace
|
print_backtrace
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
2
test/spdkcli/match_files/spdkcli_pmem.test.match
Normal file
2
test/spdkcli/match_files/spdkcli_pmem.test.match
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
o- pmemblk .............................................................................................................. [Bdevs: 1]
|
||||||
|
o- pmem_bdev ........................................................................................... [Size=31.6M, Not claimed]
|
33
test/spdkcli/pmem.sh
Executable file
33
test/spdkcli/pmem.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
MATCH_FILE="spdkcli_pmem.test"
|
||||||
|
SPDKCLI_BRANCH="/bdevs/pmemblk"
|
||||||
|
testdir=$(readlink -f $(dirname $0))
|
||||||
|
. $testdir/common.sh
|
||||||
|
|
||||||
|
timing_enter spdkcli_pmem
|
||||||
|
trap 'on_error_exit;' ERR
|
||||||
|
|
||||||
|
timing_enter run_spdk_tgt
|
||||||
|
run_spdk_tgt
|
||||||
|
timing_exit run_spdk_tgt
|
||||||
|
|
||||||
|
timing_enter spdkcli_create_pmem_config
|
||||||
|
$spdkcli_job "/bdevs/pmemblk create_pmem_pool /tmp/sample_pmem 32 512" "" True
|
||||||
|
$spdkcli_job "/bdevs/pmemblk create /tmp/sample_pmem pmem_bdev" "pmem_bdev" True
|
||||||
|
timing_exit spdkcli_create_pmem_config
|
||||||
|
|
||||||
|
timing_enter spdkcli_check_match
|
||||||
|
check_match
|
||||||
|
timing_exit spdkcli_check_match
|
||||||
|
|
||||||
|
timing_enter spdkcli_clear_pmem_config
|
||||||
|
$spdkcli_job "/bdevs/pmemblk delete pmem_bdev" "pmem_bdev"
|
||||||
|
$spdkcli_job "/bdevs/pmemblk delete_pmem_pool /tmp/sample_pmem" ""
|
||||||
|
rm -f /tmp/sample_pmem
|
||||||
|
timing_exit spdkcli_clear_pmem_config
|
||||||
|
|
||||||
|
killprocess $spdk_tgt_pid
|
||||||
|
timing_exit spdkcli_pmem
|
||||||
|
report_test_completion spdk_cli
|
Loading…
Reference in New Issue
Block a user