autotest_common.sh: move exporting flag values to the top of the file.

Recently, we moved the check for running an installed version of DPDK
above the point where we export the SPDK_* test flags. This resulted in
SPDK_RUN_INSTALLED_DPDK being undefined when trying to check fi we
should run against an installed DPDK. This just caused autotest_common
to print an error message every time it was loaded. I don't think that
it actually caused any errant behavior but this gets rid of the error
message. It's also probably a good idea to keep these definitions as
close to the top of the file as possible.

Change-Id: I5aadbe5c925ecf1ac92926b75c8c043aab73b36b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Seth Howell 2019-05-22 16:26:52 -07:00 committed by Jim Harris
parent c2868aeb57
commit f40d245180

View File

@ -23,36 +23,6 @@ function xtrace_restore() {
xtrace_disable
set -e
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 | egrep -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
echo "Unknown OS \"$(uname -s)\""
exit 1
fi
# Export flag to skip the known bug that exists in librados
# Bug is reported on ceph bug tracker with number 24078
export ASAN_OPTIONS=new_delete_type_mismatch=0
export UBSAN_OPTIONS='halt_on_error=1:print_stacktrace=1:abort_on_error=1'
export DEFAULT_RPC_ADDR="/var/tmp/spdk.sock"
: ${RUN_NIGHTLY:=0}
export RUN_NIGHTLY
@ -94,6 +64,13 @@ export RUN_NIGHTLY_FAILING
: ${SPDK_TEST_FTL_EXTENDED=0}; export SPDK_TEST_FTL_EXTENDED
: ${SPDK_AUTOTEST_X=true}; export SPDK_AUTOTEST_X
# Export flag to skip the known bug that exists in librados
# Bug is reported on ceph bug tracker with number 24078
export ASAN_OPTIONS=new_delete_type_mismatch=0
export UBSAN_OPTIONS='halt_on_error=1:print_stacktrace=1:abort_on_error=1'
export DEFAULT_RPC_ADDR="/var/tmp/spdk.sock"
if [ -z "$DEPENDENCY_DIR" ]; then
export DEPENDENCY_DIR=/home/sys_sgsw
else
@ -105,6 +82,29 @@ if [ $SPDK_RUN_VALGRIND -eq 0 ]; then
export valgrind=''
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 | egrep -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
echo "Unknown OS \"$(uname -s)\""
exit 1
fi
config_params='--enable-debug --enable-werror'
if echo -e "#include <libunwind.h>\nint main(int argc, char *argv[]) {return 0;}\n" | \