1#!/usr/bin/env bash 2 3testdir=$(readlink -f $(dirname $0)) 4rootdir=$(readlink -f $testdir/../..) 5source $rootdir/test/common/autotest_common.sh 6source $rootdir/test/spdkcli/common.sh 7source $rootdir/test/iscsi_tgt/common.sh 8 9MATCH_FILE="spdkcli_raid.test" 10SPDKCLI_BRANCH="/bdevs" 11testdir=$(readlink -f $(dirname $0)) 12. $testdir/common.sh 13 14timing_enter spdkcli_raid 15trap 'on_error_exit;' ERR 16 17timing_enter run_spdk_tgt 18run_spdk_tgt 19timing_exit run_spdk_tgt 20 21timing_enter spdkcli_create_malloc 22$spdkcli_job "'/bdevs/malloc create 8 512 Malloc1' 'Malloc1' True 23'/bdevs/malloc create 8 512 Malloc2' 'Malloc2' True 24" 25timing_exit spdkcli_create_malloc 26 27timing_enter spdkcli_create_raid 28$spdkcli_job "'/bdevs/raid_volume create testraid 0 \"Malloc1 Malloc2\" 4' 'testraid' True 29" 30timing_exit spdkcli_create_raid 31 32timing_enter spdkcli_check_match 33check_match 34timing_exit spdkcli_check_match 35 36timing_enter spdkcli_delete_raid 37$spdkcli_job "'/bdevs/raid_volume delete testraid' '' True 38" 39timing_exit spdkcli_delete_raid 40 41timing_enter spdkcli_delete_malloc 42$spdkcli_job "'/bdevs/malloc delete Malloc1' '' True 43'/bdevs/malloc delete Malloc2' '' True 44" 45timing_exit spdkcli_delete_malloc 46 47killprocess $spdk_tgt_pid 48timing_exit spdkcli_raid 49report_test_completion spdk_cli 50