Commit 2bbe6a80 authored by Pawel Wodkowski's avatar Pawel Wodkowski Committed by Daniel Verkamp
Browse files

test/vhost: remove COMMON_DIR from common.sh

parent 63c1c9d5
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@ BASE_DIR=$(readlink -f $(dirname $0))
# Default running dir -> spdk/..
[[ -z "$TEST_DIR" ]] && TEST_DIR=$BASE_DIR/../../../../

COMMON_DIR="$(cd $BASE_DIR/../common && pwd)"
TEST_DIR="$(mkdir -p $TEST_DIR && cd $TEST_DIR && echo $PWD)"
SPDK_BUILD_DIR=$BASE_DIR/../../../

@@ -26,7 +25,10 @@ INSTALL_DIR="$TEST_DIR/root"

mkdir -p $TEST_DIR

. $COMMON_DIR/autotest.config
#
# Source config describing QEMU and VHOST cores and NUMA
#
source $(readlink -f $(dirname ${BASH_SOURCE[0]}))/autotest.config

# Trace flag is optional, if it wasn't set earlier - disable it after sourcing
# autotest_common.sh
@@ -71,7 +73,7 @@ function spdk_vhost_run()
	fi

	cp $vhost_conf_template $vhost_conf_file
	$BASE_DIR/../../../scripts/gen_nvme.sh >> $vhost_conf_file
	$SPDK_BUILD_DIR/scripts/gen_nvme.sh >> $vhost_conf_file

	local cmd="$vhost_app -m $vhost_reactor_mask -p $vhost_master_core -c $vhost_conf_file"

+3 −12
Original line number Diff line number Diff line
@@ -80,19 +80,11 @@ is lower than number of requested disks for test ($max_disks)"
fi

if $distribute_cores; then
    cp $COMMON_DIR/autotest.config $COMMON_DIR/autotest.config.bak
    cp $BASE_DIR/autotest.config $COMMON_DIR/autotest.config
    . $COMMON_DIR/common.sh
fi

function restore_acfg()
{
    if $distribute_cores; then
        mv $COMMON_DIR/autotest.config.bak $COMMON_DIR/autotest.config
	# FIXME: this need to be handled entirely in common.sh
    source $BASE_DIR/autotest.config
fi
}

trap 'restore_acfg; error_exit "${FUNCNAME}" "${LINENO}"' ERR
trap 'error_exit "${FUNCNAME}" "${LINENO}"' ERR

vm_kill_all

@@ -288,4 +280,3 @@ $rpc_py get_luns

echo "INFO: Shutting down SPDK vhost app..."
spdk_vhost_kill
restore_acfg