From cf5dffe19eae81d0f99b4ae73e70b8a956f2a484 Mon Sep 17 00:00:00 2001 From: Pawel Niedzwiecki Date: Fri, 28 Sep 2018 18:30:23 +0200 Subject: [PATCH] test/spdkcli: Add a match file and match comparison to nvmf test Change-Id: I555abe8500547be81ca5a6566539dae7c8d7e690 Signed-off-by: Pawel Niedzwiecki Reviewed-on: https://review.gerrithub.io/427244 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- .../match_files/spdkcli_nvmf.test.match | 32 +++++++++++++++++++ test/spdkcli/nvmf.sh | 3 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 test/spdkcli/match_files/spdkcli_nvmf.test.match diff --git a/test/spdkcli/match_files/spdkcli_nvmf.test.match b/test/spdkcli/match_files/spdkcli_nvmf.test.match new file mode 100644 index 0000000000..95b36f64a6 --- /dev/null +++ b/test/spdkcli/match_files/spdkcli_nvmf.test.match @@ -0,0 +1,32 @@ +o- nvmf ...................................................................................................................... [...] + o- subsystem ..................................................................................................... [Subsystems: 4] + o- nqn.2014-08.org.nvmexpress.discovery ......................................................... [st=Discovery, Allow any host] + | o- hosts .......................................................................................................... [Hosts: 0] + | o- listen_addresses ........................................................................................... [Addresses: 0] + o- nqn.2014-08.org.spdk:cnode1 ...................................................... [sn=$(S), st=NVMe, Allow any host] + | o- hosts .......................................................................................................... [Hosts: 1] + | | o- nqn.2014-08.org.spdk:cnode2 ....................................................................................... [...] + | o- listen_addresses ........................................................................................... [Addresses: 3] + | | o- $(N).$(N).$(N).$(N):4260 $(S) [RDMA] + | | o- $(N).$(N).$(N).$(N):4261 $(S) [RDMA] + | | o- $(N).$(N).$(N).$(N):4262 $(S) [RDMA] + | o- namespaces ................................................................................................ [Namespaces: 4] + | o- Malloc3 .............................................................. [$(X)-$(X)-$(X)-$(X)-$(X), Malloc3, 1] + | o- Malloc4 .............................................................. [$(X)-$(X)-$(X)-$(X)-$(X), Malloc4, 2] + | o- Malloc5 .............................................................. [$(X)-$(X)-$(X)-$(X)-$(X), Malloc5, 3] + | o- Malloc6 .............................................................. [$(X)-$(X)-$(X)-$(X)-$(X), Malloc6, 4] + o- nqn.2014-08.org.spdk:cnode2 ...................................................... [sn=$(S), st=NVMe, Allow any host] + | o- hosts .......................................................................................................... [Hosts: 0] + | o- listen_addresses ........................................................................................... [Addresses: 1] + | | o- $(N).$(N).$(N).$(N):4260 $(S) [RDMA] + | o- namespaces ................................................................................................ [Namespaces: 1] + | o- Malloc2 .............................................................. [$(X)-$(X)-$(X)-$(X)-$(X), Malloc2, 1] + o- nqn.2014-08.org.spdk:cnode3 ...................................................... [sn=$(S), st=NVMe, Allow any host] + o- hosts .......................................................................................................... [Hosts: 2] + | o- nqn.2014-08.org.spdk:cnode1 ....................................................................................... [...] + | o- nqn.2014-08.org.spdk:cnode2 ....................................................................................... [...] + o- listen_addresses ........................................................................................... [Addresses: 2] + | o- $(N).$(N).$(N).$(N):4260 $(S) [RDMA] + | o- $(N).$(N).$(N).$(N):4261 $(S) [RDMA] + o- namespaces ................................................................................................ [Namespaces: 1] + o- Malloc1 .............................................................. [$(X)-$(X)-$(X)-$(X)-$(X), Malloc1, 1] diff --git a/test/spdkcli/nvmf.sh b/test/spdkcli/nvmf.sh index 8f80da2205..cf592a4ed6 100755 --- a/test/spdkcli/nvmf.sh +++ b/test/spdkcli/nvmf.sh @@ -2,6 +2,7 @@ set -xe MATCH_FILE="spdkcli_nvmf.test" +SPDKCLI_BRANCH="/nvmf" testdir=$(readlink -f $(dirname $0)) . $testdir/common.sh . $testdir/../nvmf/common.sh @@ -56,7 +57,7 @@ $spdkcli_job "/nvmf/subsystem/nqn.2014-08.org.spdk:cnode1/namespaces create Mall timing_exit spdkcli_create_nvmf_config timing_enter spdkcli_check_match -#check_match +check_match timing_exit spdkcli_check_match timing_enter spdkcli_clear_nvmf_config