From dbd140b20b9a7d6c177bb33729258203a370042b Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Tue, 3 Nov 2020 11:05:10 +0100 Subject: [PATCH] test/common: Check NASM version from within get_config_params() This is done to avoid conflicting parameters being passed to ./configure via get_config_params(). Originally, if all previous conditions were met, get_config_params() would return "--with-reduce" in the string. ./configure would lookup the NASM version on its own and disable the --with-reduce and --with-isal parameters. However, --with-reduce would be set again by ./configure while looking up the cmdline. This would end up with --with-reduce and --without-isal being set together, failing the configuration. Change-Id: I81fa1dfd4bc5b41b82525e911b1c75fc7e15fd14 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5003 Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- test/common/autotest_common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 195a7d80e..1cef9f96f 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -19,6 +19,7 @@ set -e shopt -s expand_aliases source "$rootdir/test/common/applications.sh" +source "$rootdir/scripts/common.sh" if [[ -e $rootdir/test/common/build_config.sh ]]; then source "$rootdir/test/common/build_config.sh" elif [[ -e $rootdir/mk/config.mk ]]; then @@ -375,7 +376,7 @@ function get_config_params() { fi if [ -f /usr/include/libpmem.h ] && [ $SPDK_TEST_REDUCE -eq 1 ]; then - if [ $SPDK_TEST_ISAL -eq 1 ]; then + if ge "$(nasm --version | awk '{print $3}')" 2.14 && [[ $SPDK_TEST_ISAL -eq 1 ]]; then config_params+=' --with-reduce' fi fi