From 3eb1aa934d611ee96163e65360a45ef7a254e985 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Thu, 16 Apr 2020 11:06:55 +0200 Subject: [PATCH] test/vhost: do not overwrite fio config file Fio output was saved to the same file as original fio config. For a single test run this was not an issue, but in case we run more iterations (like in performance tests) we cannot overwrite the original config file. Use fio config file name (without file extension) and add ".log" to the name. Signed-off-by: Karol Latecki Change-Id: If6f9d582ff5817c85b7cbf9192530b87a2079274 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1898 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- test/vhost/common.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 8e49f3502..fd026852d 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -1108,7 +1108,8 @@ function run_fio() local job_fname job_fname=$(basename "$job_file") - fio_start_cmd+=" --output=$out/$job_fname --output-format=$fio_output_format " + log_fname="${job_fname%%.*}.log" + fio_start_cmd+=" --output=$out/$log_fname --output-format=$fio_output_format " # prepare job file for each VM for vm in "${vms[@]}"; do @@ -1133,7 +1134,7 @@ function run_fio() fi notice "Running local fio on VM $vm_num" - vm_exec $vm_num "$vm_fio_bin --output=/root/$job_fname.out --output-format=$fio_output_format /root/$job_fname" & + vm_exec $vm_num "$vm_fio_bin --output=/root/$log_fname --output-format=$fio_output_format /root/$job_fname" & vm_exec_pids+=("$!") fi done @@ -1144,7 +1145,7 @@ function run_fio() for vm in "${vms[@]}"; do local vm_num=${vm%%:*} - vm_exec $vm_num cat /root/$job_fname.out > "$out/vm${vm_num}_${job_fname}" + vm_exec $vm_num cat /root/$log_fname > "$out/vm${vm_num}_${log_fname}" done return 0 fi @@ -1152,7 +1153,7 @@ function run_fio() $fio_start_cmd if [[ ! $hide_results ]]; then - cat $out/$job_fname + cat $out/$log_fname fi }