diff --git a/test/vhost/common/common.sh b/test/vhost/common/common.sh index 8581b1147..a3706c55b 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 72ca2e983..f54e2e0cd 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