test/vhost: improve run_fio --local option
When using --local acutally wait for fio processes to finish and then gather results back to the host system. --local allows to run independent fio instances on guest systems, avoiding fio client-server mode. This will come in handy when trying to run fio bdev plugin with virtio bdevs in guest systems. At the moment fio plugin does not work in client- server mode, so "local" must be used" Change-Id: I2020c1b636fbf4ab1fe8ef590639e0dbfd905414 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1533 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
7cf4602d11
commit
9fc706f4b6
@ -1095,13 +1095,19 @@ function run_fio()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
notice "Running local fio on VM $vm_num"
|
notice "Running local fio on VM $vm_num"
|
||||||
vm_exec $vm_num "nohup /root/fio /root/$job_fname 1>/root/$job_fname.out 2>/root/$job_fname.out </dev/null & echo \$! > /root/fio.pid"
|
vm_exec $vm_num "/root/fio --output=/root/$job_fname.out --output-format=$fio_output_format /root/$job_fname" &
|
||||||
|
vm_exec_pids+=("$!")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if ! $run_server_mode; then
|
if ! $run_server_mode; then
|
||||||
# Give FIO time to run
|
echo "Waiting for guest fio instances to finish.."
|
||||||
sleep 0.5
|
wait "${vm_exec_pids[@]}"
|
||||||
|
|
||||||
|
for vm in "${vms[@]}"; do
|
||||||
|
local vm_num=${vm%%:*}
|
||||||
|
vm_exec $vm_num cat /root/$job_fname.out > "$out/vm${vm_num}_${job_fname}"
|
||||||
|
done
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user