test/vhost: Add a vhost_rpc function to common.sh
This sends an RPC to the vhost target with the given number. Change-Id: Ifd74443087475242d3a65a0e8621dcd20ab2d1b0 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456703 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
bfdb94035e
commit
c66685defc
@ -233,6 +233,18 @@ function vhost_kill()
|
||||
return $rc
|
||||
}
|
||||
|
||||
function vhost_rpc
|
||||
{
|
||||
local vhost_num=0
|
||||
if [[ ! -z "$1" ]]; then
|
||||
vhost_num=$1
|
||||
assert_number "$vhost_num"
|
||||
fi
|
||||
shift
|
||||
|
||||
$rootdir/scripts/rpc.py -s $(get_vhost_dir $vhost_num)/rpc.sock $@
|
||||
}
|
||||
|
||||
###
|
||||
# Mgmt functions
|
||||
###
|
||||
|
Loading…
Reference in New Issue
Block a user