From c66685defc7678266dfdff41f35ea850bb2f4bc6 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Mon, 3 Jun 2019 14:46:52 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456703 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Jim Harris --- test/vhost/common.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 98b67ad3c..2ac495f64 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -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 ###