2018-07-04 20:24:49 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-06-16 05:47:10 +00:00
|
|
|
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
|
|
|
rootdir=$(readlink -f $testdir/../..)
|
|
|
|
source $rootdir/test/common/autotest_common.sh
|
|
|
|
source $rootdir/test/spdkcli/common.sh
|
2018-07-04 20:24:49 +00:00
|
|
|
|
|
|
|
MATCH_FILE="spdkcli_rbd.test"
|
2018-07-26 14:59:39 +00:00
|
|
|
SPDKCLI_BRANCH="/bdevs/rbd"
|
2018-07-04 20:24:49 +00:00
|
|
|
|
|
|
|
trap 'on_error_exit' ERR
|
|
|
|
timing_enter run_spdk_tgt
|
|
|
|
run_spdk_tgt
|
|
|
|
timing_exit run_spdk_tgt
|
|
|
|
|
|
|
|
timing_enter spdkcli_create_rbd_config
|
|
|
|
trap 'rbd_cleanup; on_error_exit' ERR
|
2018-10-19 18:48:08 +00:00
|
|
|
rbd_cleanup
|
2018-07-04 20:24:49 +00:00
|
|
|
rbd_setup 127.0.0.1
|
2019-10-23 15:15:46 +00:00
|
|
|
$spdkcli_job "\"/bdevs/rbd create rbd foo 512' 'Ceph0' True "\"/bdevs/rbd create rbd foo 512 'Ceph1' True"
|
2018-07-04 20:24:49 +00:00
|
|
|
timing_exit spdkcli_create_rbd_config
|
|
|
|
|
|
|
|
timing_enter spdkcli_check_match
|
|
|
|
check_match
|
|
|
|
timing_exit spdkcli_check_match
|
|
|
|
|
|
|
|
timing_enter spdkcli_clear_rbd_config
|
2019-10-23 15:15:46 +00:00
|
|
|
$spdkcli_job "\"/bdevs/rbd delete Ceph0 'Ceph0' "\"/bdevs/rbd delete_all' 'Ceph1' "
|
2018-07-04 20:24:49 +00:00
|
|
|
rbd_cleanup
|
|
|
|
timing_exit spdkcli_clear_rbd_config
|
|
|
|
|
|
|
|
killprocess $spdk_tgt_pid
|