From d193d9873b4e5382d30ead8e14b2fb958fdacf41 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Wed, 8 May 2019 18:08:32 +0200 Subject: [PATCH] autotest/common: fail if the requested test suite can't be run Now that SPDK_TEST_* default to 0, we can decidedly say that if the requested test suite can't be run on your system due to unmet dependencies (e.g. missing system pkg), you will get an error. Previously we would silently disable that test - e.g. when someone ran with SPDK_TEST_RBD=1 but had no librbd system pkg on his system, the SPDK autotest would return success without running any RBD tests. That was very counter-intuitive. We still silently disable a lot of tests inside our particular test scripts. Hopefully we'll stop doing that eventually. Change-Id: Ib400ba772c095b4d65fa8893a0669f3d8c3984e6 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453712 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- test/common/autotest_common.sh | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index da7f0ffce..038f4fc49 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -24,15 +24,6 @@ if [[ ! -z $1 ]]; then fi fi -# If certain utilities are not installed, preemptively disable the tests -if ! hash ceph &>/dev/null; then - SPDK_TEST_RBD=0 -fi - -if ! hash pmempool &>/dev/null; then - SPDK_TEST_PMDK=0 -fi - # Set defaults for missing test config options : ${SPDK_BUILD_DOC=0}; export SPDK_BUILD_DOC : ${SPDK_BUILD_SHARED_OBJECT=0}; export SPDK_BUILD_SHARED_OBJECT @@ -116,8 +107,6 @@ case `uname` in fi MAKE=gmake MAKEFLAGS=${MAKEFLAGS:--j$(sysctl -a | egrep -i 'hw.ncpu' | awk '{print $2}')} - SPDK_RUN_ASAN=0 - SPDK_RUN_UBSAN=0 ;; Linux) DPDK_LINUX_DIR=/usr/share/dpdk/x86_64-default-linuxapp-gcc @@ -131,11 +120,7 @@ case `uname` in config_params+=' --enable-ubsan' fi if [ $SPDK_RUN_ASAN -eq 1 ]; then - if ldconfig -p | grep -q asan; then - config_params+=' --enable-asan' - else - SPDK_RUN_ASAN=0 - fi + config_params+=' --enable-asan' fi ;; *) @@ -157,17 +142,10 @@ fi if [ -f /usr/include/libpmemblk.h ]; then config_params+=' --with-pmdk' -else - # PMDK not installed so disable PMDK tests explicitly here - SPDK_TEST_PMDK=0; export SPDK_TEST_PMDK fi if [ -f /usr/include/libpmem.h ]; then config_params+=' --with-reduce' -else - # PMDK not installed so disable any reduce tests explicitly here - # since reduce depends on libpmem - SPDK_TEST_REDUCE=0; export SPDK_TEST_REDUCE fi if [ -d /usr/src/fio ]; then @@ -186,15 +164,7 @@ if [ -d /usr/include/iscsi ]; then libiscsi_version=`grep LIBISCSI_API_VERSION /usr/include/iscsi/iscsi.h | head -1 | awk '{print $3}' | awk -F '(' '{print $2}' | awk -F ')' '{print $1}'` if [ $libiscsi_version -ge 20150621 ]; then config_params+=' --with-iscsi-initiator' - else - export SPDK_TEST_ISCSI_INITIATOR=0 fi -else - export SPDK_TEST_ISCSI_INITIATOR=0 -fi - -if [ ! -d "${DEPENDENCY_DIR}/nvme-cli" ]; then - export SPDK_TEST_NVME_CLI=0 fi if [ $SPDK_TEST_ISAL -eq 0 ]; then