test/nvmf: always test nvme-cli and build it too
nvme-cli tests with NVMe-oF could be silently skipped, based on presence of the repo on system. This patch makes it a requirement for tests to run, and with that builds nvme-cli. fixes #1469 Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I581df5a00988b775e54110f718b95beb88487145 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2970 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
f9122e9054
commit
d4658f693a
@ -10,8 +10,6 @@ if [ -z "${DEPENDENCY_DIR}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
spdk_nvme_cli="${DEPENDENCY_DIR}/nvme-cli"
|
||||
|
||||
MALLOC_BDEV_SIZE=64
|
||||
MALLOC_BLOCK_SIZE=512
|
||||
|
||||
@ -54,21 +52,22 @@ done
|
||||
|
||||
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"
|
||||
|
||||
if [ -d $spdk_nvme_cli ]; then
|
||||
# Test spdk/nvme-cli NVMe-oF commands: discover, connect and disconnect
|
||||
cd $spdk_nvme_cli
|
||||
sed -i 's/shm_id=.*/shm_id=-1/g' spdk.conf
|
||||
./nvme discover -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT"
|
||||
nvme_num_before_connection=$(get_nvme_devs 2>&1 || echo 0)
|
||||
./nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
|
||||
sleep 1
|
||||
nvme_num=$(get_nvme_devs 2>&1)
|
||||
./nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"
|
||||
if [ $nvme_num -le $nvme_num_before_connection ]; then
|
||||
echo "spdk/nvme-cli connect target devices failed"
|
||||
exit 1
|
||||
fi
|
||||
# Test spdk/nvme-cli NVMe-oF commands: discover, connect and disconnect
|
||||
nvme_cli_build
|
||||
pushd "${DEPENDENCY_DIR}/nvme-cli"
|
||||
|
||||
sed -i 's/shm_id=.*/shm_id=-1/g' spdk.conf
|
||||
./nvme discover -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT"
|
||||
nvme_num_before_connection=$(get_nvme_devs 2>&1 || echo 0)
|
||||
./nvme connect -t $TEST_TRANSPORT -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
|
||||
sleep 1
|
||||
nvme_num=$(get_nvme_devs 2>&1)
|
||||
./nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"
|
||||
if [ $nvme_num -le $nvme_num_before_connection ]; then
|
||||
echo "spdk/nvme-cli connect target devices failed"
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
|
||||
$rpc_py nvmf_delete_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
|
Loading…
Reference in New Issue
Block a user