diff --git a/autorun.sh b/autorun.sh index 0e5c4c3de..cdc27a3d5 100755 --- a/autorun.sh +++ b/autorun.sh @@ -17,5 +17,5 @@ cat "$conf" # Runs agent scripts $rootdir/autobuild.sh "$conf" -sudo -E WITH_DPDK_DIR="$WITH_DPDK_DIR" $rootdir/autotest.sh "$conf" +sudo -E $rootdir/autotest.sh "$conf" $rootdir/autopackage.sh "$conf" diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index ce82ddd11..1a6fbb6a3 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -104,8 +104,8 @@ export SPDK_TEST_REDUCE export SPDK_RUN_ASAN : ${SPDK_RUN_UBSAN=0} export SPDK_RUN_UBSAN -: ${SPDK_RUN_INSTALLED_DPDK=0} -export SPDK_RUN_INSTALLED_DPDK +: ${SPDK_RUN_EXTERNAL_DPDK=""} +export SPDK_RUN_EXTERNAL_DPDK : ${SPDK_RUN_NON_ROOT=0} export SPDK_RUN_NON_ROOT : ${SPDK_TEST_CRYPTO=0} @@ -188,19 +188,11 @@ fi if [ "$(uname -s)" = "Linux" ]; then MAKE="make" MAKEFLAGS=${MAKEFLAGS:--j$(nproc)} - DPDK_LINUX_DIR=/usr/share/dpdk/x86_64-default-linuxapp-gcc - if [ -d $DPDK_LINUX_DIR ] && [ $SPDK_RUN_INSTALLED_DPDK -eq 1 ]; then - WITH_DPDK_DIR=$DPDK_LINUX_DIR - fi # Override the default HUGEMEM in scripts/setup.sh to allocate 8GB in hugepages. export HUGEMEM=8192 elif [ "$(uname -s)" = "FreeBSD" ]; then MAKE="gmake" MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | grep -E -i 'hw.ncpu' | awk '{print $2}')} - DPDK_FREEBSD_DIR=/usr/local/share/dpdk/x86_64-native-bsdapp-clang - if [ -d $DPDK_FREEBSD_DIR ] && [ $SPDK_RUN_INSTALLED_DPDK -eq 1 ]; then - WITH_DPDK_DIR=$DPDK_FREEBSD_DIR - fi # FreeBSD runs a much more limited set of tests, so keep the default 2GB. export HUGEMEM=2048 else @@ -413,11 +405,8 @@ function get_config_params() { config_params+=' --with-uring' fi - # By default, --with-dpdk is not set meaning the SPDK build will use the DPDK submodule. - # If a DPDK installation is found in a well-known location though, WITH_DPDK_DIR will be - # set which will override the default and use that DPDK installation instead. - if [ -n "$WITH_DPDK_DIR" ]; then - config_params+=" --with-dpdk=$WITH_DPDK_DIR" + if [ -n "$SPDK_RUN_EXTERNAL_DPDK" ]; then + config_params+=" --with-dpdk=$SPDK_RUN_EXTERNAL_DPDK" fi echo "$config_params" @@ -1200,12 +1189,12 @@ function autotest_cleanup() { function freebsd_update_contigmem_mod() { if [ $(uname) = FreeBSD ]; then kldunload contigmem.ko || true - if [ -n "$WITH_DPDK_DIR" ]; then + if [ -n "$SPDK_RUN_EXTERNAL_DPDK" ]; then echo "Warning: SPDK only works on FreeBSD with patches that only exist in SPDK's dpdk submodule" - cp -f "$WITH_DPDK_DIR/kmod/contigmem.ko" /boot/modules/ - cp -f "$WITH_DPDK_DIR/kmod/contigmem.ko" /boot/kernel/ - cp -f "$WITH_DPDK_DIR/kmod/nic_uio.ko" /boot/modules/ - cp -f "$WITH_DPDK_DIR/kmod/nic_uio.ko" /boot/kernel/ + cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/contigmem.ko" /boot/modules/ + cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/contigmem.ko" /boot/kernel/ + cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/nic_uio.ko" /boot/modules/ + cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/nic_uio.ko" /boot/kernel/ else cp -f "$rootdir/dpdk/build/kmod/contigmem.ko" /boot/modules/ cp -f "$rootdir/dpdk/build/kmod/contigmem.ko" /boot/kernel/ diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index b2b3a8fc1..8a2d32eb5 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -169,8 +169,6 @@ SPDK_TEST_IOAT=0 # requires some extra configuration. see TEST_ENV_SETUP_README SPDK_TEST_VHOST=0 SPDK_TEST_VHOST_INIT=0 -# Not configured here -SPDK_RUN_INSTALLED_DPDK=0 EOF fi diff --git a/test/external_code/test_make.sh b/test/external_code/test_make.sh index af8785d38..c5ca70c51 100755 --- a/test/external_code/test_make.sh +++ b/test/external_code/test_make.sh @@ -16,7 +16,7 @@ make -C $SPDK_DIR -j$(nproc) export SPDK_HEADER_DIR="$SPDK_DIR/include" export SPDK_LIB_DIR="$SPDK_DIR/build/lib" -export DPDK_LIB_DIR="$SPDK_DIR/dpdk/build/lib" +export DPDK_LIB_DIR="${SPDK_RUN_EXTERNAL_DPDK:-$SPDK_DIR/dpdk/build}/lib" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:"$test_root/passthru" # The default target is to make both the app and bdev and link them against the combined SPDK shared library libspdk.so.