Spdk/test/vhost/fiotest/vm_ssh.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

59 lines
1.3 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 connecting to or executing command on selected VM"
echo "Usage: $(basename $1) [OPTIONS] VM_NUMBER"
echo
echo "-h, --help print help and exit"
echo " --work-dir=WORK_DIR Where to find build file. Must exist. [default: $TEST_DIR]"
echo "-w Don't wait for vm to boot"
echo "-x set -x for script debug"
exit 0
}
boot_wait=true
while getopts 'xwh-:' 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 ;;
w) boot_wait=false ;;
x) set -x ;;
*) usage $0 "Invalid argument '$OPTARG'" ;;
esac
done
. $BASE_DIR/common.sh
shift $((OPTIND-1))
vm_num="$1"
shift
if ! vm_num_is_valid $vm_num; then
usage $0 "Invalid VM num $vm_num"
exit 1
fi
if $boot_wait; then
while ! vm_os_booted $vm_num; do
if ! vm_is_running $vm_num; then
echo "ERROR: VM$vm_num is not running"
exit 1
fi
echo "INFO: waiting for VM$vm_num to boot"
sleep 1
done
fi
vm_ssh $vm_num "$@"