From 524b0ddb467f22b3a24aab4caa52ed422c3ed5db Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Mon, 16 Mar 2020 15:20:22 +0100 Subject: [PATCH] test/vhost_perf: Drop .ini config in favor of json Signed-off-by: Michal Berger Change-Id: Ida15585aa2c16e03f000ca115babc8a5a3629fe8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1284 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris Reviewed-by: Darek Stojaczyk Reviewed-by: Karol Latecki --- test/vhost/perf_bench/vhost_perf.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/vhost/perf_bench/vhost_perf.sh b/test/vhost/perf_bench/vhost_perf.sh index b25821089..bf5e03499 100755 --- a/test/vhost/perf_bench/vhost_perf.sh +++ b/test/vhost/perf_bench/vhost_perf.sh @@ -203,13 +203,18 @@ fi if [[ $run_precondition == true ]]; then # Using the same precondition routine possible for lvols thanks # to --clear-method option. Lvols should not UNMAP on creation. - $rootdir/scripts/gen_nvme.sh > $rootdir/nvme.cfg - mapfile -t nvmes < <(grep -oP "Nvme\d+" $rootdir/nvme.cfg) + json_cfg=$rootdir/nvme.json + cat <<-JSON >"$json_cfg" + {"subsystems":[ + $("$rootdir/scripts/gen_nvme.sh" --json) + ]} +JSON + mapfile -t nvmes < <(grep -oP "Nvme\d+" "$json_cfg") fio_filename=$(printf ":%sn1" "${nvmes[@]}") fio_filename=${fio_filename:1} $precond_fio_bin --name="precondition" \ --ioengine="${rootdir}/examples/bdev/fio_plugin/fio_plugin" \ - --rw="write" --spdk_conf="${rootdir}/nvme.cfg" --thread="1" \ + --rw="write" --spdk_json_conf="$json_cfg" --thread="1" \ --group_reporting --direct="1" --size="100%" --loops="2" --bs="256k" \ --iodepth=32 --filename="${fio_filename}" || true fi