Commit b665fd86 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

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: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I127caf08acad11241bf685b392617ab4b810226b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6680


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent ae53ab2d
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
#!/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
+8 −0
Original line number Diff line number Diff line
@@ -50,6 +50,10 @@ run_test "external_make_hello_no_bdev_shared_iso" make -C $test_root hello_world
run_test "external_run_hello_no_bdev_shared_iso" $test_root/hello_world/hello_bdev \
	--json $test_root/hello_world/bdev.json -b Malloc0

# Make the basic NVMe driver linked against individual shared SPDK libraries.
run_test "external_make_nvme_shared" make -C $test_root nvme_shared
run_test "external_run_nvme_shared" $test_root/nvme/identify.sh

make -C $test_root clean

make -C $SPDK_DIR clean
@@ -68,6 +72,10 @@ run_test "external_make_hello_no_bdev_static" make -C $test_root hello_world_no_
run_test "external_run_hello_no_bdev_static" $test_root/hello_world/hello_bdev \
	--json $test_root/hello_world/bdev.json -b Malloc0

# Make the basic NVMe driver statically linked against individual SPDK archives.
run_test "external_make_nvme_static" make -C $test_root nvme_static
run_test "external_run_nvme_static" $test_root/nvme/identify.sh

make -C $test_root clean
make -C $SPDK_DIR -j$(nproc) clean