test/blob: move blobiowait test to JSON config
Legacy config will be soon removed, change to JSON config. While here, removed superflous sourcing of nvmf common and -r on rm for a file. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ifd45c644192b57661131e0b3e369e389a4500432 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4614 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
7f139e549b
commit
b7db237d09
@ -9,33 +9,27 @@ fi
|
|||||||
testdir=$(readlink -f $(dirname $0))
|
testdir=$(readlink -f $(dirname $0))
|
||||||
rootdir=$(readlink -f $testdir/../../..)
|
rootdir=$(readlink -f $testdir/../../..)
|
||||||
source $rootdir/test/common/autotest_common.sh
|
source $rootdir/test/common/autotest_common.sh
|
||||||
source $rootdir/test/nvmf/common.sh
|
|
||||||
rpc_py="$rootdir/scripts/rpc.py"
|
rpc_py="$rootdir/scripts/rpc.py"
|
||||||
|
|
||||||
truncate -s 64M $testdir/aio.bdev
|
truncate -s 64M $testdir/aio.bdev
|
||||||
|
|
||||||
$rootdir/test/app/bdev_svc/bdev_svc &
|
$rootdir/test/app/bdev_svc/bdev_svc --wait-for-rpc &
|
||||||
bdev_svc_pid=$!
|
bdev_svc_pid=$!
|
||||||
|
|
||||||
trap 'killprocess $bdev_svc_pid; exit 1' SIGINT SIGTERM EXIT
|
trap 'killprocess $bdev_svc_pid; exit 1' SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
waitforlisten $bdev_svc_pid
|
waitforlisten $bdev_svc_pid
|
||||||
|
# Minimal number of bdev io pool (128) and cache (1)
|
||||||
|
$rpc_py bdev_set_options --bdev-io-pool-size 128 --bdev-io-cache-size 1
|
||||||
|
$rpc_py framework_start_init
|
||||||
$rpc_py bdev_aio_create $testdir/aio.bdev aio0 4096
|
$rpc_py bdev_aio_create $testdir/aio.bdev aio0 4096
|
||||||
$rpc_py bdev_lvol_create_lvstore aio0 lvs0
|
$rpc_py bdev_lvol_create_lvstore aio0 lvs0
|
||||||
$rpc_py bdev_lvol_create -l lvs0 lvol0 32
|
$rpc_py bdev_lvol_create -l lvs0 lvol0 32
|
||||||
|
$rpc_py save_config > $testdir/bdevperf.json
|
||||||
|
|
||||||
killprocess $bdev_svc_pid
|
killprocess $bdev_svc_pid
|
||||||
|
|
||||||
# Minimal number of bdev io pool (128) and cache (1)
|
$rootdir/test/bdev/bdevperf/bdevperf --json $testdir/bdevperf.json -q 128 -o 4096 -w write -t 5 -r /var/tmp/spdk.sock &
|
||||||
cat << EOL > $testdir/bdevperf.conf
|
|
||||||
[Bdev]
|
|
||||||
BdevIoPoolSize 128
|
|
||||||
BdevIoCacheSize 1
|
|
||||||
[AIO]
|
|
||||||
AIO $testdir/aio.bdev aio0 4096
|
|
||||||
EOL
|
|
||||||
|
|
||||||
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w write -t 5 -r /var/tmp/spdk.sock &
|
|
||||||
bdev_perf_pid=$!
|
bdev_perf_pid=$!
|
||||||
waitforlisten $bdev_perf_pid
|
waitforlisten $bdev_perf_pid
|
||||||
$rpc_py bdev_enable_histogram aio0 -e
|
$rpc_py bdev_enable_histogram aio0 -e
|
||||||
@ -44,7 +38,7 @@ $rpc_py bdev_get_histogram aio0 | $rootdir/scripts/histogram.py
|
|||||||
$rpc_py bdev_enable_histogram aio0 -d
|
$rpc_py bdev_enable_histogram aio0 -d
|
||||||
wait $bdev_perf_pid
|
wait $bdev_perf_pid
|
||||||
|
|
||||||
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w read -t 5 -r /var/tmp/spdk.sock &
|
$rootdir/test/bdev/bdevperf/bdevperf --json $testdir/bdevperf.json -q 128 -o 4096 -w read -t 5 -r /var/tmp/spdk.sock &
|
||||||
bdev_perf_pid=$!
|
bdev_perf_pid=$!
|
||||||
waitforlisten $bdev_perf_pid
|
waitforlisten $bdev_perf_pid
|
||||||
$rpc_py bdev_enable_histogram aio0 -e
|
$rpc_py bdev_enable_histogram aio0 -e
|
||||||
@ -53,9 +47,9 @@ $rpc_py bdev_get_histogram aio0 | $rootdir/scripts/histogram.py
|
|||||||
$rpc_py bdev_enable_histogram aio0 -d
|
$rpc_py bdev_enable_histogram aio0 -d
|
||||||
wait $bdev_perf_pid
|
wait $bdev_perf_pid
|
||||||
|
|
||||||
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w unmap -t 1
|
$rootdir/test/bdev/bdevperf/bdevperf --json $testdir/bdevperf.json -q 128 -o 4096 -w unmap -t 1
|
||||||
|
|
||||||
sync
|
sync
|
||||||
rm -rf $testdir/bdevperf.conf
|
rm -f $testdir/bdevperf.json
|
||||||
rm -rf $testdir/aio.bdev
|
rm -f $testdir/aio.bdev
|
||||||
trap - SIGINT SIGTERM EXIT
|
trap - SIGINT SIGTERM EXIT
|
||||||
|
Loading…
Reference in New Issue
Block a user