Spdk/test/external_code/nvme/identify.sh
Konrad Sztyber b665fd8672 test/external_code: out-of-tree NVMe driver tests
These tests compile the driver both as a shared object and statically
linking it to the identify application.  Additionally, in both
configurations, the app is used to list all available NVMe controllers,
as well as print information about each one indivdually.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I127caf08acad11241bf685b392617ab4b810226b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6680
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-09 08:28:22 +00:00

22 lines
612 B
Bash
Executable File

#!/usr/bin/env bash
testdir=$(readlink -f $(dirname $0))
rootdir=$testdir/../../..
source $rootdir/test/common/autotest_common.sh
export SPDK_LIB_DIR=$rootdir/build/lib
export DPDK_LIB_DIR=${SPDK_RUN_EXTERNAL_DPDK:-$rootdir/dpdk/build}/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SPDK_LIB_DIR:$DPDK_LIB_DIR:$testdir
# Make sure all NVMe devices are reported if no address is specified
identify_data=$($testdir/identify)
for bdf in $(get_nvme_bdfs); do
grep $bdf <<< $identify_data
done
# Verify that each device can be queried individually too
for bdf in $(get_nvme_bdfs); do
$testdir/identify $bdf
done