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

test/vhost: Require vhost num as first arg to vhost_run



Making this explicit makes the tests clearer

Change-Id: I6c37f873683b38b644bebc42532694d45a181d04
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461387


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMaciej Szwed <maciej.szwed@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 80494b8e
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -121,15 +121,14 @@ function vhost_list_all()
function vhost_run()
{
	local param
	local vhost_num=0
	local vhost_num="$1"
	local memory=1024

	assert_number "$vhost_num"
	shift

	for param in "$@"; do
		case $param in
			--vhost-num=*)
				vhost_num="${param#*=}"
				assert_number "$vhost_num"
				;;
			--memory=*) local memory=${param#*=} ;;
			--no-pci*) local no_pci="-u" ;;
			*)
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ if [[ $test_type =~ "spdk_vhost" ]]; then
	notice ""
	notice "running SPDK"
	notice ""
	vhost_run
	vhost_run 0
	vhost_json_config 0 $testdir/conf.json
	notice ""
fi
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ notice "==============="
notice ""
notice "running SPDK"
notice ""
vhost_run
vhost_run 0
$rpc_py set_bdev_nvme_hotplug -e
$rpc_py construct_split_vbdev Nvme0n1 16
$rpc_py construct_malloc_bdev 128 512 -b Malloc
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ function create_bdev_config()
}

timing_enter vhost_run
vhost_run
vhost_run 0
timing_exit vhost_run

timing_enter create_bdev_config
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ trap 'error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR
vm_kill_all

notice "Starting SPDK vhost"
vhost_run
vhost_run 0
notice "..."

# Set up lvols and vhost controllers
Loading