Commit c66685de authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

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: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456703


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent bfdb9403
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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
###