From 3c92d9f1666b2c8f8cc7c7826a535a4f6a325ca6 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Wed, 18 Mar 2020 11:43:35 -0400 Subject: [PATCH] test/compress: add selection of pmd to run test against This will allow to test parts of compress bdev on systems that do not have all types of PMDs. Once case if for testing in VMs. For reference on changes in execution time. Current times: Per-patch = 8 seconds Nightly = 84 seconds Running the script twice in this patch, most likely doubles the time. It is not an issue in per-patch, but if increasing nightly times is blocking different solution could be done here. Signed-off-by: Tomasz Zawadzki Change-Id: I684569651f2290956f94fcec99cebf0fe13ba0d2 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1364 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- autotest.sh | 3 ++- test/compress/compress.sh | 27 +++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/autotest.sh b/autotest.sh index a0f914fbf..6b32cbc60 100755 --- a/autotest.sh +++ b/autotest.sh @@ -281,7 +281,8 @@ if [ $SPDK_RUN_FUNCTIONAL_TEST -eq 1 ]; then fi if [ $SPDK_TEST_REDUCE -eq 1 ]; then - run_test "compress" ./test/compress/compress.sh + run_test "compress_qat" ./test/compress/compress.sh "qat" + run_test "compress_isal" ./test/compress/compress.sh "isal" fi if [ $SPDK_TEST_OPAL -eq 1 ]; then diff --git a/test/compress/compress.sh b/test/compress/compress.sh index e0cba25a4..79837a386 100755 --- a/test/compress/compress.sh +++ b/test/compress/compress.sh @@ -21,7 +21,6 @@ function destroy_vols() { # bdev_compress_delete will delete the on-disk metadata as well as # the persistent memory file containing its metadata. $rpc_py bdev_compress_delete COMP_lvs0/lv0 - $rpc_py bdev_compress_delete COMP_lvs0/lv1 $rpc_py bdev_lvol_delete_lvstore -l lvs0 } @@ -33,20 +32,9 @@ function create_vols() { $rpc_py bdev_lvol_create -t -l lvs0 lv0 100 waitforbdev lvs0/lv0 - $rpc_py bdev_lvol_create -t -l lvs0 lv1 100 - waitforbdev lvs0/lv1 - - # use QAT for lv0, if the test system does not have QAT this will - # fail which is what we want - $rpc_py compress_set_pmd -p 1 + $rpc_py compress_set_pmd -p "$pmd" $rpc_py bdev_compress_create -b lvs0/lv0 -p /tmp/pmem waitforbdev COMP_lvs0/lv0 - - # use ISAL for lv1, if ISAL is for some reason not available this will - # fail which is what we want - $rpc_py compress_set_pmd -p 2 - $rpc_py bdev_compress_create -b lvs0/lv1 -p /tmp/pmem - waitforbdev COMP_lvs0/lv1 } function run_bdevio() { @@ -73,6 +61,18 @@ function run_bdevperf() { killprocess $bdevperf_pid } +test_type=$1 +case "$test_type" in + qat ) + pmd=1;; + isal ) + pmd=2;; + * ) + echo "invalid pmd name" + exit 1 + ;; +esac + mkdir -p /tmp/pmem # per patch bdevperf uses slightly different params than nightly @@ -92,7 +92,6 @@ if [ $RUN_NIGHTLY -eq 1 ]; then create_vols $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode0 -a -s SPDK0 $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode0 COMP_lvs0/lv0 - $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode0 COMP_lvs0/lv1 $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode0 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT # Start random read writes in the background