Spdk/test/vhost/fiotest/vm_run.sh
Piotr Pelplinski 1dbf53eebf vhost: add a library and app for userspace vhost-scsi processing
This patch adds a library, application and test scripts for extending
SPDK to present virtio-scsi controllers to QEMU-based VMs and
process I/O submitted to devices attached to those controllers.
This functionality is dependent on QEMU patches to enable
vhost-scsi in userspace - those patches are currently working their
way through the QEMU mailing list, but temporary patches to enable
this functionality in QEMU will be made available shortly through the
SPDK github repository.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Signed-off-by: Michal Kosciowski <michal.kosciowski@intel.com>
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>

Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Change-Id: I138e4021f0ac4b1cd9a6e4041783cdf06e6f0efb
2017-03-06 12:44:35 -07:00

49 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
BASE_DIR=$(readlink -f $(dirname $0))
[[ -z "$TEST_DIR" ]] && TEST_DIR="$(cd $BASE_DIR/../../../../ && pwd)"
function usage()
{
[[ ! -z $2 ]] && ( echo "$2"; echo ""; )
echo "Shortcut script for enabling VMs"
echo "Usage: $(basename $1) [OPTIONS] VM..."
echo
echo "-h, --help print help and exit"
echo " --work-dir=WORK_DIR Where to find build file. Must exist. [default: ./..]"
echo "-a Run all VMs in WORK_DIR"
echo "-x set -x for script debug"
exit 0
}
run_all=false
while getopts 'xah-:' optchar; do
case "$optchar" in
-)
case "$OPTARG" in
help) usage $0 ;;
work-dir=*) TEST_DIR="${OPTARG#*=}" ;;
*) usage $0 "Invalid argument '$OPTARG'" ;;
esac
;;
h) usage $0 ;;
a) run_all=true ;;
x) set -x ;;
*) usage $0 "Invalid argument '$OPTARG'"
esac
done
. $BASE_DIR/common.sh
if [[ $EUID -ne 0 ]]; then
echo "Go away user come back as root"
exit 1
fi
if $run_all; then
vm_run -a
else
shift $((OPTIND-1))
echo "INFO: running VMs: $@"
vm_run "$@"
fi