test/vhost: Separate vhost_json_config from vhost_run
There are upcoming simplifications where it will be better if these are two separate steps. Change-Id: I618f947dc314b05a4f94ea98c63fe85539544704 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461386 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
0140c62b1e
commit
80494b8ec5
@ -130,7 +130,6 @@ function vhost_run()
|
||||
vhost_num="${param#*=}"
|
||||
assert_number "$vhost_num"
|
||||
;;
|
||||
--json-path=*) local vhost_json_path="${param#*=}" ;;
|
||||
--memory=*) local memory=${param#*=} ;;
|
||||
--no-pci*) local no_pci="-u" ;;
|
||||
*)
|
||||
@ -185,14 +184,19 @@ function vhost_run()
|
||||
-s $vhost_dir/rpc.sock load_subsystem_config
|
||||
fi
|
||||
|
||||
if [[ -n "$vhost_json_path" ]]; then
|
||||
$rootdir/scripts/rpc.py -s $vhost_dir/rpc.sock load_config < "$vhost_json_path/conf.json"
|
||||
fi
|
||||
|
||||
notice "vhost started - pid=$vhost_pid"
|
||||
timing_exit vhost_start
|
||||
}
|
||||
|
||||
function vhost_load_config()
|
||||
{
|
||||
local vhost_num="$1"
|
||||
local vhost_json_conf="$2"
|
||||
local vhost_dir="$(get_vhost_dir $vhost_num)"
|
||||
|
||||
$rootdir/scripts/rpc.py -s $vhost_dir/rpc.sock load_config < "$vhost_json_conf"
|
||||
}
|
||||
|
||||
function vhost_kill()
|
||||
{
|
||||
local rc=0
|
||||
|
@ -81,7 +81,8 @@ if [[ $test_type =~ "spdk_vhost" ]]; then
|
||||
notice ""
|
||||
notice "running SPDK"
|
||||
notice ""
|
||||
vhost_run --json-path=$testdir
|
||||
vhost_run
|
||||
vhost_json_config 0 $testdir/conf.json
|
||||
notice ""
|
||||
fi
|
||||
|
||||
|
@ -69,7 +69,8 @@ if [[ $RUN_NIGHTLY -eq 1 ]]; then
|
||||
notice ""
|
||||
notice "running SPDK"
|
||||
notice ""
|
||||
vhost_run --json-path=$testdir
|
||||
vhost_run
|
||||
vhost_json_config 0 $testdir/conf.json
|
||||
notice ""
|
||||
|
||||
rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
||||
|
Loading…
Reference in New Issue
Block a user