From d6379a8833fe29a3da7bfec011cb30f3f64076fb Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Tue, 10 Dec 2019 10:55:42 -0700 Subject: [PATCH] test/bdev: convert qos tests to run_test semantics. Change-Id: I5b52cc57c09bebcb80921821f293ab464c9f915a Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477490 Tested-by: SPDK CI Jenkins Community-CI: Broadcom SPDK FC-NVMe CI Reviewed-by: Shuhei Matsumoto Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- test/bdev/blockdev.sh | 53 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/test/bdev/blockdev.sh b/test/bdev/blockdev.sh index d241182e6..ad2678fb7 100755 --- a/test/bdev/blockdev.sh +++ b/test/bdev/blockdev.sh @@ -130,7 +130,7 @@ function qos_function_test() { # Run bdevperf with IOPS rate limit on bdev 1 $rpc_py bdev_set_qos_limit --rw_ios_per_sec $iops_limit $QOS_DEV_1 - run_qos_test $iops_limit IOPS $QOS_DEV_1 + run_test "case" "bdev_qos_iops" run_qos_test $iops_limit IOPS $QOS_DEV_1 # Run bdevperf with bandwidth rate limit on bdev 2 # Set the bandwidth limit as 1/10 of the measure performance without QoS @@ -140,16 +140,38 @@ function qos_function_test() { bw_limit=$qos_lower_bw_limit fi $rpc_py bdev_set_qos_limit --rw_mbytes_per_sec $bw_limit $QOS_DEV_2 - run_qos_test $bw_limit BANDWIDTH $QOS_DEV_2 + run_test "case" "bdev_qos_bw" run_qos_test $bw_limit BANDWIDTH $QOS_DEV_2 # Run bdevperf with additional read only bandwidth rate limit on bdev 1 $rpc_py bdev_set_qos_limit --r_mbytes_per_sec $qos_lower_bw_limit $QOS_DEV_1 - run_qos_test $qos_lower_bw_limit BANDWIDTH $QOS_DEV_1 + run_test "case" "bdev_qos_ro_bw" run_qos_test $qos_lower_bw_limit BANDWIDTH $QOS_DEV_1 else echo "Actual IOPS without limiting is too low - exit testing" fi } +function qos_test_suite() { + # Run bdevperf with QoS disabled first + $testdir/bdevperf/bdevperf -z -m 0x2 -q 256 -o 4096 -w randread -t 60 & + QOS_PID=$! + echo "Process qos testing pid: $QOS_PID" + trap 'killprocess $QOS_PID; exit 1' SIGINT SIGTERM EXIT + waitforlisten $QOS_PID + + $rpc_py bdev_null_create $QOS_DEV_1 128 512 + waitforbdev $QOS_DEV_1 + $rpc_py bdev_null_create $QOS_DEV_2 128 512 + waitforbdev $QOS_DEV_2 + + $rootdir/test/bdev/bdevperf/bdevperf.py perform_tests & + qos_function_test + + $rpc_py bdev_null_delete $QOS_DEV_1 + $rpc_py bdev_null_delete $QOS_DEV_2 + killprocess $QOS_PID + trap - SIGINT SIGTERM EXIT +} + # Inital bdev creation and configuration #----------------------------------------------------- QOS_DEV_1="Null_0" @@ -259,6 +281,7 @@ fi # Run bdevperf with gpt run_test "case" "bdev_gpt_verify" $testdir/bdevperf/bdevperf -c $testdir/bdev_gpt.conf -q 128 -o 4096 -w verify -t 5 run_test "case" "bdev_gpt_write_zeroes" $testdir/bdevperf/bdevperf -c $testdir/bdev_gpt.conf -q 128 -o 4096 -w write_zeroes -t 1 +run_test "suite" "bdev_qos" qos_test_suite # Temporarily disabled - infinite loop # if [ $RUN_NIGHTLY -eq 1 ]; then @@ -266,30 +289,6 @@ run_test "case" "bdev_gpt_write_zeroes" $testdir/bdevperf/bdevperf -c $testdir/b # report_test_completion "nightly_bdev_reset" # fi -timing_enter qos - -# Run bdevperf with QoS disabled first -$testdir/bdevperf/bdevperf -z -m 0x2 -q 256 -o 4096 -w randread -t 60 & -QOS_PID=$! -echo "Process qos testing pid: $QOS_PID" -trap 'killprocess $QOS_PID; exit 1' SIGINT SIGTERM EXIT -waitforlisten $QOS_PID - -$rpc_py bdev_null_create $QOS_DEV_1 128 512 -waitforbdev $QOS_DEV_1 -$rpc_py bdev_null_create $QOS_DEV_2 128 512 -waitforbdev $QOS_DEV_2 - -$rootdir/test/bdev/bdevperf/bdevperf.py perform_tests & -qos_function_test - -$rpc_py bdev_null_delete $QOS_DEV_1 -$rpc_py bdev_null_delete $QOS_DEV_2 -killprocess $QOS_PID -trap - SIGINT SIGTERM EXIT - -timing_exit qos - if grep -q Nvme0 $testdir/bdev.conf; then part_dev_by_gpt $testdir/bdev.conf Nvme0n1 $rootdir reset fi