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:
Pawel Niedzwiecki 2018-07-26 16:59:39 +02:00 committed by Jim Harris
parent 5f9bdac004
commit 46f60d43f1
7 changed files with 11 additions and 26 deletions

View File

@ -9,7 +9,7 @@ spdkcli_job="python3 $SPDKCLI_BUILD_DIR/test/spdkcli/spdkcli_job.py"
function on_error_exit() {
set +e
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
exit 1
}
@ -21,7 +21,7 @@ function run_spdk_tgt() {
}
function check_match() {
python3 $SPDKCLI_BUILD_DIR/scripts/spdkcli.py ll > $testdir/${MATCH_FILE}
$SPDKCLI_BUILD_DIR/test/app/match/match -v $testdir/${MATCH_FILE}.match
rm -f $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_files/${MATCH_FILE}.match
rm -f $testdir/match_files/${MATCH_FILE}
}

View File

@ -0,0 +1,2 @@
o- rbd .................................................................................................................. [Bdevs: 1]
o- Ceph0 ............................................................................................. [Size=1000.0M, Not claimed]

View File

@ -2,6 +2,7 @@
set -xe
MATCH_FILE="spdkcli_rbd.test"
SPDKCLI_BRANCH="/bdevs/rbd"
testdir=$(readlink -f $(dirname $0))
. $testdir/common.sh

View File

@ -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 .................................................................................................................. [...]

View File

@ -2,6 +2,7 @@
set -xe
MATCH_FILE="spdkcli_vhost.test"
SPDKCLI_BRANCH="/"
testdir=$(readlink -f $(dirname $0))
. $testdir/common.sh
@ -47,9 +48,9 @@ check_match
timing_exit spdkcli_check_match
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
$SPDKCLI_BUILD_DIR/test/app/match/match -v $testdir/spdkcli_details_vhost.test.match
rm -f $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/match_files/spdkcli_details_vhost.test.match
rm -f $testdir/match_files/spdkcli_details_vhost.test
timing_exit spdkcli_check_match_details
timing_enter spdkcli_clear_config