From a787a314573e526fda436e1f1c9f70ec7550be39 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Wed, 29 Sep 2021 18:50:55 +0800 Subject: [PATCH] test/vfio-user: enable NVMe compliance tests with vfio-user Also add "-g" parameter to use single segment file. Change-Id: If12c75ccdf1e6074951819fb94cc85a982f9d843 Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9677 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- test/nvme/compliance/compliance.sh | 2 +- test/nvme/compliance/nvme_compliance.c | 5 ++++- test/nvmf/nvmf.sh | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/nvme/compliance/compliance.sh b/test/nvme/compliance/compliance.sh index af43b593b..2ff1aafa4 100755 --- a/test/nvme/compliance/compliance.sh +++ b/test/nvme/compliance/compliance.sh @@ -36,7 +36,7 @@ $rpc_py nvmf_create_subsystem $nqn -a -s spdk $rpc_py nvmf_subsystem_add_ns $nqn malloc0 $rpc_py nvmf_subsystem_add_listener $nqn -t $TEST_TRANSPORT -a $traddr -s 0 -$testdir/nvme_compliance -r "trtype:$TEST_TRANSPORT traddr:$traddr subnqn:$nqn" +$testdir/nvme_compliance -g -r "trtype:$TEST_TRANSPORT traddr:$traddr subnqn:$nqn" killprocess $nvmfpid diff --git a/test/nvme/compliance/nvme_compliance.c b/test/nvme/compliance/nvme_compliance.c index 69d282d52..1a1b6641c 100644 --- a/test/nvme/compliance/nvme_compliance.c +++ b/test/nvme/compliance/nvme_compliance.c @@ -118,8 +118,11 @@ parse_args(int argc, char **argv, struct spdk_env_opts *opts) { char op; - while ((op = getopt(argc, argv, "r:")) != -1) { + while ((op = getopt(argc, argv, "gr:")) != -1) { switch (op) { + case 'g': + opts->hugepage_single_segments = true; + break; case 'r': g_trid_str = optarg; break; diff --git a/test/nvmf/nvmf.sh b/test/nvmf/nvmf.sh index 79aa94681..f107313af 100755 --- a/test/nvmf/nvmf.sh +++ b/test/nvmf/nvmf.sh @@ -45,6 +45,7 @@ run_test "nvmf_delete_subsystem" test/nvmf/target/delete_subsystem.sh "${TEST_AR if [ $SPDK_TEST_VFIOUSER -eq 1 ]; then run_test "nvmf_vfio_user" test/nvmf/target/nvmf_vfio_user.sh "${TEST_ARGS[@]}" + run_test "nvmf_vfio_user_nvme_compliance" test/nvme/compliance/compliance.sh "${TEST_ARGS[@]}" fi if ! check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then