numam-spdk/test/vmd/vmd.sh
Wojciech Malikowski 1d717c7cd9 test/vmd: Basic VMD tests
Added basic tests for NVMe disks behind VMD.

Change-Id: I9613ca4aa813bab16f4085ac809dbdc8028f1cfc
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459639
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-18 03:52:37 +00:00

44 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
testdir=$(readlink -f $(dirname $0))
rootdir=$(readlink -f $testdir/../..)
source $rootdir/scripts/common.sh
source $rootdir/test/common/autotest_common.sh
pci_devs=$($rootdir/app/spdk_lspci/spdk_lspci | grep "NVMe disk behind VMD" | awk '{print $1}')
if [ -z $pci_devs]; then
echo "Couldn't find any NVMe device behind a VMD."
exit 1
fi
timing_enter vmd
timing_enter identify
for bdf in $pci_devs; do
$rootdir/examples/nvme/identify/identify -i 0 -V -r "trtype:PCIe traddr:$bdf"
done
timing_exit identify
timing_enter hello_world
$rootdir/examples/nvme/hello_world/hello_world -V
timing_exit
timing_enter perf
for bdf in $pci_devs; do
$rootdir/examples/nvme/perf/perf -q 128 -w read -o 12288 -t 1 -LL -i 0 -V -r "trtype:PCIe traddr:$bdf"
done
timing_exit perf
if [ -d /usr/src/fio ]; then
timing_enter fio_plugin
PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin
for bdf in $pci_devs; do
fio_nvme $testdir/config/config.fio --filename="trtype=PCIe traddr=${bdf//:/.} ns=1"
report_test_completion "bdev_fio"
done
timing_exit fio_plugin
fi
timing_exit vmd