autotest: Call nvme_namespace_revert() only under Linux

This routine depends on nvme-cli which on FreeBSD can be installed
only through ports - this operation is not supported by SPDK's
provisioning tooling, like pkgdep.sh or vm_setup.sh. Considering
that, it's unlikely that working nvme tool will be available on
generic FreeBSD system, thus skip this work entirely.

Change-Id: Ib2f12a65b6f000f1b4d9d3beda6b349685f263c7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4670
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2020-10-14 14:36:37 +02:00 committed by Jim Harris
parent 13d01bed16
commit ce4d070961

View File

@ -116,8 +116,10 @@ if [ $(uname -s) = Linux ]; then
fi
fi
# Revert NVMe namespaces to default state
nvme_namespace_revert
if [[ $(uname -s) == Linux ]]; then
# Revert NVMe namespaces to default state
nvme_namespace_revert
fi
# Delete all leftover lvols and gpt partitions
# Matches both /dev/nvmeXnY on Linux and /dev/nvmeXnsY on BSD