test/spdkcli: Add few changes
- specify spdkcli tree branch for match test. Test only specified branch - move match files to subfolder to keep it organized Change-Id: I7796ff13d38b2bfd500fd71442bcb6e6fa95df01 Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com> Reviewed-on: https://review.gerrithub.io/420517 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
5f9bdac004
commit
46f60d43f1
@ -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/spdkcli_details_vhost.test /tmp/sample_aio
|
rm -f $testdir/${MATCH_FILE} $testdir/match_files/spdkcli_details_vhost.test /tmp/sample_aio
|
||||||
print_backtrace
|
print_backtrace
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -21,7 +21,7 @@ function run_spdk_tgt() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function check_match() {
|
function check_match() {
|
||||||
python3 $SPDKCLI_BUILD_DIR/scripts/spdkcli.py ll > $testdir/${MATCH_FILE}
|
python3 $SPDKCLI_BUILD_DIR/scripts/spdkcli.py ll $SPDKCLI_BRANCH > $testdir/match_files/${MATCH_FILE}
|
||||||
$SPDKCLI_BUILD_DIR/test/app/match/match -v $testdir/${MATCH_FILE}.match
|
$SPDKCLI_BUILD_DIR/test/app/match/match -v $testdir/match_files/${MATCH_FILE}.match
|
||||||
rm -f $testdir/${MATCH_FILE}
|
rm -f $testdir/match_files/${MATCH_FILE}
|
||||||
}
|
}
|
||||||
|
2
test/spdkcli/match_files/spdkcli_rbd.test.match
Normal file
2
test/spdkcli/match_files/spdkcli_rbd.test.match
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
o- rbd .................................................................................................................. [Bdevs: 1]
|
||||||
|
o- Ceph0 ............................................................................................. [Size=1000.0M, Not claimed]
|
@ -2,6 +2,7 @@
|
|||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
MATCH_FILE="spdkcli_rbd.test"
|
MATCH_FILE="spdkcli_rbd.test"
|
||||||
|
SPDKCLI_BRANCH="/bdevs/rbd"
|
||||||
testdir=$(readlink -f $(dirname $0))
|
testdir=$(readlink -f $(dirname $0))
|
||||||
. $testdir/common.sh
|
. $testdir/common.sh
|
||||||
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
o- / ......................................................................................................................... [...]
|
|
||||||
o- bdevs ................................................................................................................... [...]
|
|
||||||
| o- aio .............................................................................................................. [Bdevs: 0]
|
|
||||||
| o- error ............................................................................................................ [Bdevs: 0]
|
|
||||||
| o- iscsi ............................................................................................................ [Bdevs: 0]
|
|
||||||
| o- logical_volume ................................................................................................... [Bdevs: 0]
|
|
||||||
| o- malloc ........................................................................................................... [Bdevs: 0]
|
|
||||||
| o- null ............................................................................................................. [Bdevs: 0]
|
|
||||||
| o- nvme ............................................................................................................. [Bdevs: 0]
|
|
||||||
| o- pmemblk .......................................................................................................... [Bdevs: 0]
|
|
||||||
| o- rbd .............................................................................................................. [Bdevs: 1]
|
|
||||||
| | o- Ceph0 ......................................................................................... [Size=1000.0M, Not claimed]
|
|
||||||
| o- split_disk ....................................................................................................... [Bdevs: 0]
|
|
||||||
| o- virtioblk_disk ................................................................................................... [Bdevs: 0]
|
|
||||||
| o- virtioscsi_disk .................................................................................................. [Bdevs: 0]
|
|
||||||
o- lvol_stores .................................................................................................. [Lvol stores: 0]
|
|
||||||
o- vhost ................................................................................................................... [...]
|
|
||||||
o- block ................................................................................................................. [...]
|
|
||||||
o- scsi .................................................................................................................. [...]
|
|
@ -2,6 +2,7 @@
|
|||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
MATCH_FILE="spdkcli_vhost.test"
|
MATCH_FILE="spdkcli_vhost.test"
|
||||||
|
SPDKCLI_BRANCH="/"
|
||||||
testdir=$(readlink -f $(dirname $0))
|
testdir=$(readlink -f $(dirname $0))
|
||||||
. $testdir/common.sh
|
. $testdir/common.sh
|
||||||
|
|
||||||
@ -47,9 +48,9 @@ check_match
|
|||||||
timing_exit spdkcli_check_match
|
timing_exit spdkcli_check_match
|
||||||
|
|
||||||
timing_enter spdkcli_check_match_details
|
timing_enter spdkcli_check_match_details
|
||||||
python3 $SPDKCLI_BUILD_DIR/scripts/spdkcli.py bdevs/split_disk/Nvme0n1p0 show_details | jq -r -S '.' > $testdir/spdkcli_details_vhost.test
|
python3 $SPDKCLI_BUILD_DIR/scripts/spdkcli.py bdevs/split_disk/Nvme0n1p0 show_details | jq -r -S '.' > $testdir/match_files/spdkcli_details_vhost.test
|
||||||
$SPDKCLI_BUILD_DIR/test/app/match/match -v $testdir/spdkcli_details_vhost.test.match
|
$SPDKCLI_BUILD_DIR/test/app/match/match -v $testdir/match_files/spdkcli_details_vhost.test.match
|
||||||
rm -f $testdir/spdkcli_details_vhost.test
|
rm -f $testdir/match_files/spdkcli_details_vhost.test
|
||||||
timing_exit spdkcli_check_match_details
|
timing_exit spdkcli_check_match_details
|
||||||
|
|
||||||
timing_enter spdkcli_clear_config
|
timing_enter spdkcli_clear_config
|
||||||
|
Loading…
Reference in New Issue
Block a user