From 957ebeb5066adff65c27fa45e6e6c98434232eca Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Wed, 25 Oct 2017 14:23:27 +0200 Subject: [PATCH] test/vhost: remove read tests from vhost initiator Removing read and randread from test runs as read operations are performed as part of write with verify enabled tests. Slight code cleanup included. Change-Id: Ia3b92ed16cf4c1b873d0f54a0c0677c52f9b726a Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/383770 Reviewed-by: Pawel Kaminski Reviewed-by: Pawel Wodkowski Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp --- test/vhost/initiator/blockdev.sh | 33 ++++++++------------------------ 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/test/vhost/initiator/blockdev.sh b/test/vhost/initiator/blockdev.sh index 453938934..c34772fd2 100755 --- a/test/vhost/initiator/blockdev.sh +++ b/test/vhost/initiator/blockdev.sh @@ -7,15 +7,21 @@ rootdir=$(readlink -f $testdir/../../..) plugindir=$rootdir/examples/bdev/fio_plugin rpc_py="$rootdir/scripts/rpc.py" +if [ $RUN_NIGHTLY -eq 1 ]; then + fio_rw=("write" "randwrite" "rw" "randrw") +else + fio_rw=("randwrite") +fi -function run_fio() -{ +function run_fio() { LD_PRELOAD=$plugindir/fio_plugin /usr/src/fio/fio --ioengine=spdk_bdev --iodepth=128 --bs=4k --runtime=10 $testdir/bdev.fio "$@" --spdk_mem=1024 fio_status=$? if [ $fio_status != 0 ]; then spdk_vhost_kill exit 1 fi + rm -f *.state + rm -f $testdir/bdev.fio } function prepare_fio_job_for_unmap() { @@ -81,27 +87,9 @@ for bdev in $bdevs; do if [ -d /usr/src/fio ]; then timing_enter fio - if [ $RUN_NIGHTLY -eq 1 ]; then - fio_rw=("write" "read" "randwrite" "randread" "rw" "randrw") - else - fio_rw=("write" "read") - fi for rw in "${fio_rw[@]}"; do timing_enter fio_rw_verify cp $testdir/../common/fio_jobs/default_initiator.job $testdir/bdev.fio - if [ $rw == "read" ] || [ $rw == "randread" ]; then - echo "size=100m" >> $testdir/bdev.fio - echo "io_size=400m" >> $testdir/bdev.fio - echo "[job_write]" >> $testdir/bdev.fio - echo "stonewall" >> $testdir/bdev.fio - echo "rw=write" >> $testdir/bdev.fio - echo "do_verify=0" >> $testdir/bdev.fio - echo -n "filename=" >> $testdir/bdev.fio - for b in $(echo $bdevs | jq -r '.name'); do - echo -n "$b:" >> $testdir/bdev.fio - done - echo "" >> $testdir/bdev.fio - fi echo "[job_$rw]" >> $testdir/bdev.fio echo "stonewall" >> $testdir/bdev.fio echo "rw=$rw" >> $testdir/bdev.fio @@ -112,8 +100,6 @@ for bdev in $bdevs; do run_fio --spdk_conf=$testdir/bdev.conf - rm -f *.state - rm -f $testdir/bdev.fio timing_exit fio_rw_verify done @@ -121,9 +107,6 @@ for bdev in $bdevs; do cp $testdir/../common/fio_jobs/default_initiator.job $testdir/bdev.fio prepare_fio_job_for_unmap run_fio --spdk_conf=$testdir/bdev.conf - rm -f *.state - rm -f $testdir/bdev.fio - timing_exit fio fi