Skip to content

Commit

Permalink
test/spdkcli: test vhost_target show_details method
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463281
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Paul Luse <[email protected]>
Reviewed-by: Ben Walker <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
  • Loading branch information
Vitaliy Mysak authored and jimharris committed Jul 26, 2019
1 parent ca1a3bf commit e7ef737
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/spdkcli/match_files/spdkcli_details_vhost_target.test.match
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"id": 0,
"luns": [
{
"bdev_name": "Malloc2",
"id": 0
}
],
"scsi_dev_num": 0,
"target_name": "Target 0"
}
4 changes: 4 additions & 0 deletions test/spdkcli/vhost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e7ef737

Please sign in to comment.