test/vhost: Add calls to vhosttestinit and vhosttestfini
Change-Id: I0b564a6931b91f5226ad6a6909c5285f5cb76a71 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454944 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
0a48fd0601
commit
6de97c1a91
@ -71,6 +71,8 @@ if [[ ! -r "$fio_job" ]]; then
|
|||||||
fail "no fio job file specified"
|
fail "no fio job file specified"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
vhosttestinit
|
||||||
|
|
||||||
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR
|
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR
|
||||||
|
|
||||||
vm_kill_all
|
vm_kill_all
|
||||||
@ -263,3 +265,5 @@ else
|
|||||||
notice ""
|
notice ""
|
||||||
notice "==============="
|
notice "==============="
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
@ -41,6 +41,8 @@ while getopts 'h-:' optchar; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
vhosttestinit
|
||||||
|
|
||||||
source $testdir/autotest.config
|
source $testdir/autotest.config
|
||||||
PLUGIN_DIR=$rootdir/examples/bdev/fio_plugin
|
PLUGIN_DIR=$rootdir/examples/bdev/fio_plugin
|
||||||
RPC_PY="$rootdir/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
RPC_PY="$rootdir/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
||||||
@ -203,3 +205,5 @@ $RPC_PY delete_nvme_controller Nvme0
|
|||||||
timing_enter spdk_vhost_kill
|
timing_enter spdk_vhost_kill
|
||||||
spdk_vhost_kill
|
spdk_vhost_kill
|
||||||
timing_exit spdk_vhost_kill
|
timing_exit spdk_vhost_kill
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
@ -50,6 +50,8 @@ while getopts 'xh-:' optchar; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
vhosttestinit
|
||||||
|
|
||||||
. $(readlink -e "$(dirname $0)/../common.sh") || exit 1
|
. $(readlink -e "$(dirname $0)/../common.sh") || exit 1
|
||||||
rpc_py="$SPDK_BUILD_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
rpc_py="$SPDK_BUILD_DIR/scripts/rpc.py -s $(get_vhost_dir)/rpc.sock"
|
||||||
|
|
||||||
@ -98,3 +100,5 @@ $rpc_py delete_nvme_controller Nvme0
|
|||||||
|
|
||||||
notice "Shutting down SPDK vhost app..."
|
notice "Shutting down SPDK vhost app..."
|
||||||
spdk_vhost_kill
|
spdk_vhost_kill
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
@ -98,6 +98,8 @@ while getopts 'xh-:' optchar; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
vhosttestinit
|
||||||
|
|
||||||
notice "Get NVMe disks:"
|
notice "Get NVMe disks:"
|
||||||
nvmes=($(iter_pci_class_code 01 08 02))
|
nvmes=($(iter_pci_class_code 01 08 02))
|
||||||
|
|
||||||
@ -282,3 +284,5 @@ $rpc_py get_vhost_controllers
|
|||||||
|
|
||||||
notice "Shutting down SPDK vhost app..."
|
notice "Shutting down SPDK vhost app..."
|
||||||
spdk_vhost_kill
|
spdk_vhost_kill
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
@ -53,6 +53,8 @@ for param in "$@"; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
vhosttestinit
|
||||||
|
|
||||||
. $(readlink -e "$(dirname $0)/../common.sh") || exit 1
|
. $(readlink -e "$(dirname $0)/../common.sh") || exit 1
|
||||||
MIGRATION_DIR=$(readlink -f $(dirname $0))
|
MIGRATION_DIR=$(readlink -f $(dirname $0))
|
||||||
|
|
||||||
@ -149,3 +151,5 @@ notice "Migration Test SUCCESS"
|
|||||||
notice "==============="
|
notice "==============="
|
||||||
|
|
||||||
trap - SIGINT ERR EXIT
|
trap - SIGINT ERR EXIT
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
@ -32,6 +32,8 @@ while getopts 'xh-:' optchar; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
vhosttestinit
|
||||||
|
|
||||||
trap error_exit ERR
|
trap error_exit ERR
|
||||||
|
|
||||||
VHOST_APP="$SPDK_BUILD_DIR/app/vhost/vhost"
|
VHOST_APP="$SPDK_BUILD_DIR/app/vhost/vhost"
|
||||||
@ -143,3 +145,5 @@ if [[ $RUN_NIGHTLY -eq 1 ]]; then
|
|||||||
notice "EXIT DONE"
|
notice "EXIT DONE"
|
||||||
notice "==============="
|
notice "==============="
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
@ -46,6 +46,8 @@ while getopts 'xh-:' optchar; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
vhosttestinit
|
||||||
|
|
||||||
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR
|
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR
|
||||||
|
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
@ -131,3 +133,5 @@ blk_ro_tc1
|
|||||||
$rpc_py delete_nvme_controller Nvme0
|
$rpc_py delete_nvme_controller Nvme0
|
||||||
|
|
||||||
spdk_vhost_kill
|
spdk_vhost_kill
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
@ -17,6 +17,8 @@ function run_spdk_fio() {
|
|||||||
--spdk_mem=1024 --spdk_single_seg=1 --spdk_conf=$testdir/bdev.conf "$@"
|
--spdk_mem=1024 --spdk_single_seg=1 --spdk_conf=$testdir/bdev.conf "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vhosttestinit
|
||||||
|
|
||||||
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR SIGTERM SIGABRT
|
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR SIGTERM SIGABRT
|
||||||
|
|
||||||
spdk_vhost_run
|
spdk_vhost_run
|
||||||
@ -30,3 +32,5 @@ sleep 1
|
|||||||
run_spdk_fio --size=50% --offset=50% --filename=VirtioBlk0
|
run_spdk_fio --size=50% --offset=50% --filename=VirtioBlk0
|
||||||
wait $run_fio_pid
|
wait $run_fio_pid
|
||||||
spdk_vhost_kill
|
spdk_vhost_kill
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
@ -56,6 +56,8 @@ if [[ -z $os_image ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
@ -112,3 +114,5 @@ spdk_vhost_kill
|
|||||||
timing_exit clean_vhost
|
timing_exit clean_vhost
|
||||||
|
|
||||||
timing_exit vhost_boot
|
timing_exit vhost_boot
|
||||||
|
|
||||||
|
vhosttestfini
|
||||||
|
Loading…
Reference in New Issue
Block a user