From 9798e12bad1d2915a5bf99b3ab5aacecf35e7886 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Thu, 18 Jun 2020 08:23:53 -0400 Subject: [PATCH] test/nvme-cli: exit early if unsupported nvme-cli is used Only spdk/nvme-cli fork with spdk-1.6 branch is supported. Even then this will be deprecated at some point in the future, in favor of nvme-cuse. This came up when fixing the tests to actually run. If unsupported nvme-cli is used, compilation succeeds and tests fail at the functional test part with non-obvious message : # ./nvme id-ctrl 0000:84:00.0 0000:84:00.0: No such file or directory Some of the CI machines need to be updated, but this check will make it easier to gauge what went wrong. Signed-off-by: Tomasz Zawadzki Change-Id: Ia19121a6c49b9618b8fea9e13304e27089f13dcf Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2948 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Maciej Wawryk Reviewed-by: Karol Latecki --- test/common/autotest_common.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index e0490f7eaa..17a80794ae 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -831,6 +831,11 @@ function nvme_cli_build() { exit 1 fi + if ! grep -q "DEF_VER=v1.6" $spdk_nvme_cli/NVME-VERSION-GEN; then + echo "SPDK supports only \"spdk/nvme-cli\" project on \"spdk-1.6\" branch." + exit 1 + fi + # Build against the version of SPDK under test pushd $spdk_nvme_cli