test/spdkcli: test vhost_target show_details method

Add a match test for vhost_target show_details method.
In spdkcli source the equivalent function is `UIVhostTargetObj.show_details`.
This method is one of few that left untested in spdkcli.

This patch is related to trello task:
https://trello.com/c/CHOOxcGj/151-spdkcli-extend-test-coverage

Change-Id: I3747b0bef4a54606765c81a003bbc9e12fe32858
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463281
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Vitaliy Mysak 2019-07-16 21:16:59 +00:00 committed by Jim Harris
parent ca1a3bf18e
commit e7ef737702
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,11 @@
{
"id": 0,
"luns": [
{
"bdev_name": "Malloc2",
"id": 0
}
],
"scsi_dev_num": 0,
"target_name": "Target 0"
}

View File

@ -77,6 +77,10 @@ $spdkcli_job "'save_config $testdir/config.json'
timing_exit spdkcli_save_config
timing_enter spdkcli_check_match_details
$rootdir/scripts/spdkcli.py vhost/scsi/vhost_scsi1/Target_0 show_details | jq -r -S '.' > $testdir/match_files/spdkcli_details_vhost_target.test
$rootdir/test/app/match/match $testdir/match_files/spdkcli_details_vhost_target.test.match
rm -f $testdir/match_files/spdkcli_details_vhost_target.test
$rootdir/scripts/spdkcli.py bdevs/split_disk/Nvme0n1p0 show_details | jq -r -S '.' > $testdir/match_files/spdkcli_details_vhost.test
$rootdir/test/app/match/match $testdir/match_files/spdkcli_details_vhost.test.match
rm -f $testdir/match_files/spdkcli_details_vhost.test