From 4a4c905b3257889168c1bc0b7d853914bbb61dc4 Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Tue, 25 Apr 2023 11:44:59 +0200 Subject: [PATCH] test/bdev: extend chaining test with bdev layer ENOMEM case The test already checked ENOMEM handling, but it only used bdevs that support chaining (crypto, malloc), so bdev layer didn't need to execute any accel operations. So, to force bdev layer to do that, a passthru bdev was added, as it doesn't support chaining. Signed-off-by: Konrad Sztyber Change-Id: I322a65ccebb0f144c759692fff285cfd44bbab4b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17766 Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk --- test/bdev/chaining.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/bdev/chaining.sh b/test/bdev/chaining.sh index 6c38df0c3..6ad361a0a 100755 --- a/test/bdev/chaining.sh +++ b/test/bdev/chaining.sh @@ -139,6 +139,28 @@ rpc_cmd <<- CONFIG CONFIG "$rootdir/examples/bdev/bdevperf/bdevperf.py" perform_tests +killprocess $bperfpid + +# Verify ENOMEM handling in the bdev layer by using the same accel configuration, but adding a +# passthru bdev, which doesn't support memory domains/accel, to force bdev layer to append copies +# and execute accel sequences +"$rootdir/build/examples/bdevperf" -t 5 -w verify -o 4096 -q 256 --wait-for-rpc -z & +bperfpid=$! + +waitforlisten $bperfpid +rpc_cmd <<- CONFIG + accel_set_options --task-count 16 + framework_start_init + bdev_malloc_create 32 4096 -b malloc0 + accel_crypto_key_create -c AES_XTS -k "${key0[0]}" -e "${key0[1]}" -n key0 + accel_crypto_key_create -c AES_XTS -k "${key1[0]}" -e "${key1[1]}" -n key1 + bdev_passthru_create -p pt0 -b malloc0 + bdev_crypto_create pt0 crypto0 -n key0 + bdev_crypto_create crypto0 crypto1 -n key1 +CONFIG + +"$rootdir/examples/bdev/bdevperf/bdevperf.py" perform_tests +killprocess $bperfpid trap - SIGINT SIGTERM EXIT killprocess $bperfpid