From 2bbe6a8021b5d773066a08359bdd7762d321f46f Mon Sep 17 00:00:00 2001 From: Pawel Wodkowski Date: Thu, 16 Nov 2017 15:46:44 +0100 Subject: [PATCH] test/vhost: remove COMMON_DIR from common.sh Change-Id: Id6bb86151ec3a90298c135acb45c5cc259975348 Signed-off-by: Pawel Wodkowski Reviewed-on: https://review.gerrithub.io/387799 Reviewed-by: Karol Latecki Reviewed-by: Dariusz Stojaczyk Reviewed-by: Jim Harris Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp --- test/vhost/common/common.sh | 8 +++++--- test/vhost/lvol/lvol_test.sh | 15 +++------------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/test/vhost/common/common.sh b/test/vhost/common/common.sh index 8581b11473..a3706c55b1 100644 --- a/test/vhost/common/common.sh +++ b/test/vhost/common/common.sh @@ -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" diff --git a/test/vhost/lvol/lvol_test.sh b/test/vhost/lvol/lvol_test.sh index 72ca2e9839..f54e2e0cdb 100755 --- a/test/vhost/lvol/lvol_test.sh +++ b/test/vhost/lvol/lvol_test.sh @@ -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 + # FIXME: this need to be handled entirely in common.sh + source $BASE_DIR/autotest.config fi -function restore_acfg() -{ - if $distribute_cores; then - mv $COMMON_DIR/autotest.config.bak $COMMON_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