test/vm_setup: install required nvme-cli tool

Currently used fork of nvme-cli (nvme-cli v1.8 with our patch)
doesn't work well with namespace manage feature (e.g. namespace
deletion or working with NSID=0xffffffff). These problems seems
to be fixed in later versions of nvme-cli (v1.11.1 for now).

Nvme-cli tool must be patched to support namespace devices
exposed as character devices. Required modification is
already merged with current nvme-cli master in

  commit: e770466615096a6d41f038a28819b00bc3078e1d

and hopefully will be available in the next release of nvme-cli
(>1.11.1).

Next steps would be:

 1) Change the commit hash to a release that includes mentioned
    patch.

 2) Drop the compilation when system repos contain the right
    release.

Change-Id: I07846cba955e580f5a8861ad4c7e50e7f4adccfb
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2417
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Tomasz Kulasek 2020-05-13 12:39:55 +02:00 committed by Tomasz Zawadzki
parent a36e9605c0
commit 8d69fd9139

View File

@ -331,8 +331,11 @@ function install_nvmecli() {
echo "nvme-cli already checked out. Skipping"
fi
if [ ! -d "/usr/local/src/nvme-cli" ]; then
git clone "https://review.spdk.io/spdk/nvme-cli" "nvme-cli-cuse"
git -C ./nvme-cli-cuse checkout nvme-cuse
# Changes required for SPDK are already merged on top of
# nvme-cli, however not released yet.
# Support for SPDK should be released in nvme-cli >1.11.1
git clone "https://github.com/linux-nvme/nvme-cli.git" "nvme-cli-cuse"
git -C ./nvme-cli-cuse checkout "e770466615096a6d41f038a28819b00bc3078e1d"
make -C ./nvme-cli-cuse
sudo mv ./nvme-cli-cuse /usr/local/src/nvme-cli
fi