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 <tomasz.zawadzki@intel.com> Change-Id: I684569651f2290956f94fcec99cebf0fe13ba0d2 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1364 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
c241161ad2
commit
3c92d9f166
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user