From a2ab5eb0c6eacea6bfd777bc45577280646c1c8a Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Thu, 12 Sep 2019 09:05:43 +0200 Subject: [PATCH] test/vhost: respect additional params for vhost_run Removing "shift" command because it was not needed and caused vhost run command to be not properly constructed. Needed to fix if contition for --no-pci param while at it. There was no $no_pci variable defined after optargs were removed. Change-Id: I72c615fdb2a5fd507efedae100b9b79c5cfd8935 Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468202 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker --- test/vhost/common.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 3142008cd..8f2b9775e 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -111,8 +111,6 @@ function vhost_run() { local vhost_name="$1" - shift - if [[ -z "$vhost_name" ]]; then error "vhost name must be provided to vhost_run" return 1 @@ -147,7 +145,7 @@ function vhost_run() notice "waiting for app to run..." waitforlisten "$vhost_pid" "$vhost_dir/rpc.sock" #do not generate nvmes if pci access is disabled - if [[ -z "$no_pci" ]]; then + if [[ "$cmd" != *"--no-pci"* ]] && [[ "$cmd" != *"-u"* ]]; then $rootdir/scripts/gen_nvme.sh "--json" | $rootdir/scripts/rpc.py\ -s $vhost_dir/rpc.sock load_subsystem_config fi