test/vhost: Rename spdk_vhost_run to vhost_run
We typically don't prefix bash functions with spdk. Change-Id: Icda57e42acb83f4aa51731ac62f8db7ee26e658a Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456700 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
86f38e70e9
commit
9132128ff3
@ -103,7 +103,7 @@ function spdk_vhost_list_all()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function spdk_vhost_run()
|
function vhost_run()
|
||||||
{
|
{
|
||||||
local param
|
local param
|
||||||
local vhost_num=0
|
local vhost_num=0
|
||||||
|
@ -82,7 +82,7 @@ if [[ $test_type =~ "spdk_vhost" ]]; then
|
|||||||
notice ""
|
notice ""
|
||||||
notice "running SPDK"
|
notice "running SPDK"
|
||||||
notice ""
|
notice ""
|
||||||
spdk_vhost_run --json-path=$testdir
|
vhost_run --json-path=$testdir
|
||||||
notice ""
|
notice ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ notice "==============="
|
|||||||
notice ""
|
notice ""
|
||||||
notice "running SPDK"
|
notice "running SPDK"
|
||||||
notice ""
|
notice ""
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
$rpc_py set_bdev_nvme_hotplug -e
|
$rpc_py set_bdev_nvme_hotplug -e
|
||||||
$rpc_py construct_split_vbdev Nvme0n1 16
|
$rpc_py construct_split_vbdev Nvme0n1 16
|
||||||
$rpc_py construct_malloc_bdev 128 512 -b Malloc
|
$rpc_py construct_malloc_bdev 128 512 -b Malloc
|
||||||
|
@ -115,9 +115,9 @@ function create_bdev_config()
|
|||||||
| join(":")' <<< $vbdevs)
|
| join(":")' <<< $vbdevs)
|
||||||
}
|
}
|
||||||
|
|
||||||
timing_enter spdk_vhost_run
|
timing_enter vhost_run
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
timing_exit spdk_vhost_run
|
timing_exit vhost_run
|
||||||
|
|
||||||
timing_enter create_bdev_config
|
timing_enter create_bdev_config
|
||||||
create_bdev_config
|
create_bdev_config
|
||||||
|
@ -61,7 +61,7 @@ trap 'error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR
|
|||||||
vm_kill_all
|
vm_kill_all
|
||||||
|
|
||||||
notice "Starting SPDK vhost"
|
notice "Starting SPDK vhost"
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
notice "..."
|
notice "..."
|
||||||
|
|
||||||
# Set up lvols and vhost controllers
|
# Set up lvols and vhost controllers
|
||||||
|
@ -121,7 +121,7 @@ trap 'error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR
|
|||||||
vm_kill_all
|
vm_kill_all
|
||||||
|
|
||||||
notice "running SPDK vhost"
|
notice "running SPDK vhost"
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
notice "..."
|
notice "..."
|
||||||
|
|
||||||
trap 'clean_lvol_cfg; error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR
|
trap 'clean_lvol_cfg; error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR
|
||||||
|
@ -57,7 +57,7 @@ function migration_tc1()
|
|||||||
local job_file="$MIGRATION_DIR/migration-tc1.job"
|
local job_file="$MIGRATION_DIR/migration-tc1.job"
|
||||||
|
|
||||||
# Run vhost
|
# Run vhost
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
migration_tc1_configure_vhost
|
migration_tc1_configure_vhost
|
||||||
|
|
||||||
notice "Setting up VMs"
|
notice "Setting up VMs"
|
||||||
|
@ -102,11 +102,11 @@ function migration_tc2_configure_vhost()
|
|||||||
$rootdir/scripts/gen_nvme.sh --json | $rpc_nvmf load_subsystem_config
|
$rootdir/scripts/gen_nvme.sh --json | $rpc_nvmf load_subsystem_config
|
||||||
timing_exit start_nvmf_tgt
|
timing_exit start_nvmf_tgt
|
||||||
|
|
||||||
spdk_vhost_run --memory=512 --vhost-num=0 --no-pci
|
vhost_run --memory=512 --vhost-num=0 --no-pci
|
||||||
# Those are global intentionally
|
# Those are global intentionally
|
||||||
vhost_1_reactor_mask=0x2
|
vhost_1_reactor_mask=0x2
|
||||||
vhost_1_master_core=1
|
vhost_1_master_core=1
|
||||||
spdk_vhost_run --memory=512 --vhost-num=1 --no-pci
|
vhost_run --memory=512 --vhost-num=1 --no-pci
|
||||||
|
|
||||||
local rdma_ip_list=$(get_available_rdma_ips)
|
local rdma_ip_list=$(get_available_rdma_ips)
|
||||||
local nvmf_target_ip=$(echo "$rdma_ip_list" | head -n 1)
|
local nvmf_target_ip=$(echo "$rdma_ip_list" | head -n 1)
|
||||||
|
@ -120,7 +120,7 @@ function host1_start_vhost()
|
|||||||
|
|
||||||
notice "Starting vhost0 instance on local server"
|
notice "Starting vhost0 instance on local server"
|
||||||
trap 'host1_cleanup_vhost; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT
|
trap 'host1_cleanup_vhost; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT
|
||||||
spdk_vhost_run --vhost-num=0 --no-pci
|
vhost_run --vhost-num=0 --no-pci
|
||||||
$rpc_0 construct_nvme_bdev -b Nvme0 -t rdma -f ipv4 -a $RDMA_TARGET_IP -s 4420 -n "nqn.2018-02.io.spdk:cnode1"
|
$rpc_0 construct_nvme_bdev -b Nvme0 -t rdma -f ipv4 -a $RDMA_TARGET_IP -s 4420 -n "nqn.2018-02.io.spdk:cnode1"
|
||||||
$rpc_0 construct_vhost_scsi_controller $incoming_vm_ctrlr
|
$rpc_0 construct_vhost_scsi_controller $incoming_vm_ctrlr
|
||||||
$rpc_0 add_vhost_scsi_lun $incoming_vm_ctrlr 0 Nvme0n1
|
$rpc_0 add_vhost_scsi_lun $incoming_vm_ctrlr 0 Nvme0n1
|
||||||
|
@ -33,7 +33,7 @@ function host_2_start_vhost()
|
|||||||
|
|
||||||
notice "Starting vhost 1 instance on remote server"
|
notice "Starting vhost 1 instance on remote server"
|
||||||
trap 'host_2_cleanup_vhost; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT
|
trap 'host_2_cleanup_vhost; error_exit "${FUNCNAME}" "${LINENO}"' INT ERR EXIT
|
||||||
spdk_vhost_run --vhost-num=1 --no-pci
|
vhost_run --vhost-num=1 --no-pci
|
||||||
|
|
||||||
$rpc construct_nvme_bdev -b Nvme0 -t rdma -f ipv4 -a $RDMA_TARGET_IP -s 4420 -n "nqn.2018-02.io.spdk:cnode1"
|
$rpc construct_nvme_bdev -b Nvme0 -t rdma -f ipv4 -a $RDMA_TARGET_IP -s 4420 -n "nqn.2018-02.io.spdk:cnode1"
|
||||||
$rpc construct_vhost_scsi_controller $target_vm_ctrl
|
$rpc construct_vhost_scsi_controller $target_vm_ctrl
|
||||||
|
@ -69,7 +69,7 @@ if [[ $RUN_NIGHTLY -eq 1 ]]; then
|
|||||||
notice ""
|
notice ""
|
||||||
notice "running SPDK"
|
notice "running SPDK"
|
||||||
notice ""
|
notice ""
|
||||||
spdk_vhost_run --json-path=$testdir
|
vhost_run --json-path=$testdir
|
||||||
notice ""
|
notice ""
|
||||||
|
|
||||||
rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
||||||
|
@ -247,7 +247,7 @@ if [[ "$ctrl_type" == "kernel_vhost" ]]; then
|
|||||||
else
|
else
|
||||||
# Run vhost process and prepare split vbdevs or lvol bdevs
|
# Run vhost process and prepare split vbdevs or lvol bdevs
|
||||||
notice "running SPDK vhost"
|
notice "running SPDK vhost"
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
notice "..."
|
notice "..."
|
||||||
|
|
||||||
if [[ $use_split == true ]]; then
|
if [[ $use_split == true ]]; then
|
||||||
|
@ -123,7 +123,7 @@ function blk_ro_tc1()
|
|||||||
vm_shutdown_all
|
vm_shutdown_all
|
||||||
}
|
}
|
||||||
|
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
if [[ -z $x ]]; then
|
if [[ -z $x ]]; then
|
||||||
set +x
|
set +x
|
||||||
fi
|
fi
|
||||||
|
@ -21,7 +21,7 @@ vhosttestinit
|
|||||||
|
|
||||||
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR SIGTERM SIGABRT
|
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR SIGTERM SIGABRT
|
||||||
|
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
|
|
||||||
$rpc_py construct_malloc_bdev -b Malloc 124 4096
|
$rpc_py construct_malloc_bdev -b Malloc 124 4096
|
||||||
$rpc_py construct_vhost_blk_controller Malloc.0 Malloc
|
$rpc_py construct_vhost_blk_controller Malloc.0 Malloc
|
||||||
|
@ -61,7 +61,7 @@ vhosttestinit
|
|||||||
timing_enter vhost_boot
|
timing_enter vhost_boot
|
||||||
trap 'err_clean "${FUNCNAME}" "${LINENO}"' ERR
|
trap 'err_clean "${FUNCNAME}" "${LINENO}"' ERR
|
||||||
timing_enter start_vhost
|
timing_enter start_vhost
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
timing_exit start_vhost
|
timing_exit start_vhost
|
||||||
|
|
||||||
timing_enter create_lvol
|
timing_enter create_lvol
|
||||||
|
@ -85,11 +85,11 @@ vm_kill_all
|
|||||||
# Violating this rule doesn't cause any issues for SPDK vhost,
|
# Violating this rule doesn't cause any issues for SPDK vhost,
|
||||||
# but triggers an assert, so we can only run Windows VMs with non-debug SPDK builds.
|
# but triggers an assert, so we can only run Windows VMs with non-debug SPDK builds.
|
||||||
notice "running SPDK vhost"
|
notice "running SPDK vhost"
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
notice "..."
|
notice "..."
|
||||||
|
|
||||||
# Prepare bdevs for later vhost controllers use
|
# Prepare bdevs for later vhost controllers use
|
||||||
# Nvme bdev is automatically constructed during spdk_vhost_run
|
# Nvme bdev is automatically constructed during vhost_run
|
||||||
# by using scripts/gen_nvme.sh. No need to add it manually.
|
# by using scripts/gen_nvme.sh. No need to add it manually.
|
||||||
# Using various sizes to better identify bdevs if no name in BLK
|
# Using various sizes to better identify bdevs if no name in BLK
|
||||||
# is available
|
# is available
|
||||||
|
@ -45,8 +45,8 @@ trap "rm -f $aio_file; rm -rf $testdir/results; error_exit" SIGINT SIGTERM ERR
|
|||||||
mkdir -p $testdir/results
|
mkdir -p $testdir/results
|
||||||
dd if=/dev/zero of=$aio_file bs=1M count=512
|
dd if=/dev/zero of=$aio_file bs=1M count=512
|
||||||
|
|
||||||
timing_enter spdk_vhost_run
|
timing_enter vhost_run
|
||||||
spdk_vhost_run
|
vhost_run
|
||||||
$rpc_py set_bdev_nvme_hotplug -e
|
$rpc_py set_bdev_nvme_hotplug -e
|
||||||
$rpc_py construct_malloc_bdev 256 4096 -b Malloc0
|
$rpc_py construct_malloc_bdev 256 4096 -b Malloc0
|
||||||
$rpc_py construct_aio_bdev $aio_file Aio0 512
|
$rpc_py construct_aio_bdev $aio_file Aio0 512
|
||||||
@ -56,7 +56,7 @@ $rpc_py add_vhost_scsi_lun naa.vhost.1 0 Nvme0n1
|
|||||||
$rpc_py add_vhost_scsi_lun naa.vhost.1 1 Malloc0
|
$rpc_py add_vhost_scsi_lun naa.vhost.1 1 Malloc0
|
||||||
# TODO: Currently there is bug for aio device. Disable this test
|
# TODO: Currently there is bug for aio device. Disable this test
|
||||||
# $rpc_py add_vhost_scsi_lun naa.vhost.1 2 Aio0
|
# $rpc_py add_vhost_scsi_lun naa.vhost.1 2 Aio0
|
||||||
timing_exit spdk_vhost_run
|
timing_exit vhost_run
|
||||||
|
|
||||||
timing_enter start_vm
|
timing_enter start_vm
|
||||||
vm_setup --force=1 --disk-type=spdk_vhost_scsi --os=$WINDOWS_IMG --disks=vhost --memory=4096
|
vm_setup --force=1 --disk-type=spdk_vhost_scsi --os=$WINDOWS_IMG --disks=vhost --memory=4096
|
||||||
|
Loading…
Reference in New Issue
Block a user