test/vhost: update QEMU to spdk-2.12-pre branch
Install the new custom qemu branch in a different location (/usr/local/qemu/spdk-2.12-pre) so it can coexist with the current qemu branch. Change-Id: I6986dcaef804dcefc4e77c83c019ba0f3be8dbd6 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/398983 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
This commit is contained in:
parent
7d63026b95
commit
1ca22afa2e
@ -62,6 +62,7 @@ sudo dnf install -y lcov
|
|||||||
sudo dnf install -y libuuid-devel
|
sudo dnf install -y libuuid-devel
|
||||||
sudo dnf install -y elfutils-libelf-devel
|
sudo dnf install -y elfutils-libelf-devel
|
||||||
sudo dnf install -y flex
|
sudo dnf install -y flex
|
||||||
|
sudo dnf install -y bison
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
|
|
||||||
@ -137,15 +138,16 @@ git clone https://github.com/brendangregg/FlameGraph.git
|
|||||||
mkdir -p /usr/local
|
mkdir -p /usr/local
|
||||||
sudo mv FlameGraph /usr/local/FlameGraph
|
sudo mv FlameGraph /usr/local/FlameGraph
|
||||||
|
|
||||||
|
SPDK_QEMU_BRANCH=spdk-2.12-pre
|
||||||
# The SPDK branch of Qemu contains some extra functionality needed by SPDK. However, that branch is not currently
|
mkdir -p qemu
|
||||||
# compatible with GCC 7. Some of the SPDK changes are currently out for review on Qemu's main branch. Until those
|
|
||||||
# changes are merged, this specific review provides support for both spdk and GCC 7.
|
|
||||||
mkdir -p vhost
|
|
||||||
cd vhost
|
|
||||||
git clone https://review.gerrithub.io/spdk/qemu
|
|
||||||
cd qemu
|
cd qemu
|
||||||
./configure --prefix=/home/sys_sgsw/spdk_repo/root --target-list="x86_64-softmmu" --enable-kvm --enable-linux-aio --enable-numa
|
git clone https://github.com/spdk/qemu -b "$SPDK_QEMU_BRANCH" "$SPDK_QEMU_BRANCH"
|
||||||
|
cd "$SPDK_QEMU_BRANCH"
|
||||||
|
if hash tsocks &> /dev/null; then
|
||||||
|
git_param="--with-git='tsocks git'"
|
||||||
|
fi
|
||||||
|
./configure "$git_param" --prefix=/usr/local/qemu/$SPDK_QEMU_BRANCH --target-list="x86_64-softmmu" --enable-kvm --enable-linux-aio --enable-numa
|
||||||
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
cd ~
|
cd ~
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
: ${SPDK_VHOST_VERBOSE=false}
|
: ${SPDK_VHOST_VERBOSE=false}
|
||||||
|
: ${QEMU_PREFIX="/usr/local/qemu/spdk-2.12-pre"}
|
||||||
|
|
||||||
BASE_DIR=$(readlink -f $(dirname $0))
|
BASE_DIR=$(readlink -f $(dirname $0))
|
||||||
|
|
||||||
@ -66,8 +67,6 @@ echo "Using SSH key file $SPDK_VHOST_SSH_KEY_FILE"
|
|||||||
VM_BASE_DIR="$TEST_DIR/vms"
|
VM_BASE_DIR="$TEST_DIR/vms"
|
||||||
|
|
||||||
|
|
||||||
INSTALL_DIR="$TEST_DIR/root"
|
|
||||||
|
|
||||||
mkdir -p $TEST_DIR
|
mkdir -p $TEST_DIR
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -501,7 +500,7 @@ function vm_setup()
|
|||||||
|
|
||||||
if [[ "$os_mode" == "backing" ]]; then
|
if [[ "$os_mode" == "backing" ]]; then
|
||||||
notice "Creating backing file for OS image file: $os"
|
notice "Creating backing file for OS image file: $os"
|
||||||
if ! $INSTALL_DIR/bin/qemu-img create -f qcow2 -b $os $vm_dir/os.qcow2; then
|
if ! $QEMU_PREFIX/bin/qemu-img create -f qcow2 -b $os $vm_dir/os.qcow2; then
|
||||||
error "Failed to create OS backing file in '$vm_dir/os.qcow2' using '$os'"
|
error "Failed to create OS backing file in '$vm_dir/os.qcow2' using '$os'"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -534,7 +533,7 @@ function vm_setup()
|
|||||||
local task_mask=${!qemu_mask_param}
|
local task_mask=${!qemu_mask_param}
|
||||||
|
|
||||||
notice "TASK MASK: $task_mask"
|
notice "TASK MASK: $task_mask"
|
||||||
local cmd="taskset -a $task_mask $INSTALL_DIR/bin/qemu-system-x86_64 ${eol}"
|
local cmd="taskset -a $task_mask $QEMU_PREFIX/bin/qemu-system-x86_64 ${eol}"
|
||||||
local vm_socket_offset=$(( 10000 + 100 * vm_num ))
|
local vm_socket_offset=$(( 10000 + 100 * vm_num ))
|
||||||
|
|
||||||
local ssh_socket=$(( vm_socket_offset + 0 ))
|
local ssh_socket=$(( vm_socket_offset + 0 ))
|
||||||
|
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
|
: ${QEMU_PREFIX="/usr/local/qemu/spdk-2.12-pre"}
|
||||||
|
|
||||||
basedir=$(readlink -f $(dirname $0))
|
basedir=$(readlink -f $(dirname $0))
|
||||||
rootdir=$(readlink -f $basedir/../../..)
|
rootdir=$(readlink -f $basedir/../../..)
|
||||||
testdir=$(readlink -f $rootdir/..)
|
testdir=$(readlink -f $rootdir/..)
|
||||||
qemu_install_dir="$testdir/root"
|
|
||||||
MAKE="make -j$(( $(nproc) * 2 ))"
|
MAKE="make -j$(( $(nproc) * 2 ))"
|
||||||
|
|
||||||
rpc_py="python $rootdir/scripts/rpc.py "
|
rpc_py="python $rootdir/scripts/rpc.py "
|
||||||
@ -47,7 +48,7 @@ fi
|
|||||||
|
|
||||||
# Check if Qemu binary is present
|
# Check if Qemu binary is present
|
||||||
if [[ -z $VM_QEMU ]]; then
|
if [[ -z $VM_QEMU ]]; then
|
||||||
VM_QEMU="$qemu_install_dir/bin/qemu-system-x86_64"
|
VM_QEMU="$QEMU_PREFIX/bin/qemu-system-x86_64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -x $VM_QEMU ]]; then
|
if [[ ! -x $VM_QEMU ]]; then
|
||||||
@ -55,7 +56,7 @@ if [[ ! -x $VM_QEMU ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $QEMU_IMG ]]; then
|
if [[ -z $QEMU_IMG ]]; then
|
||||||
QEMU_IMG="$qemu_install_dir/bin/qemu-img"
|
QEMU_IMG="$QEMU_PREFIX/bin/qemu-img"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running test with filesystem: $VM_FS"
|
echo "Running test with filesystem: $VM_FS"
|
||||||
|
Loading…
Reference in New Issue
Block a user