Commit 971451a8 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

perf/vhost: Allow to add extra fio config through $fio_extra_conf



$fio_extra_conf can either point at an existing file or be an
attached stdin the fio_conf() should read from.

Signed-off-by: default avatarMichal Berger <michallinuxstuff@gmail.com>
Change-Id: If902262b0100fb056491928b3f667ab15e6e0024
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12429


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 0ee37d25
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@ rootdir=$(readlink -f "$curdir/../../../")

source "$rootdir/test/vhost/common.sh"

# Allow for the fio_conf() to slurp extra config from the stdin.
exec {fio_extra_conf}<&0

fio_conf() {
	cat <<- FIO
		[global]
@@ -25,6 +28,14 @@ fio_conf() {
		FIO_URING
	fi

	if [[ -e $fio_extra_conf ]]; then
		# Overriden through cmdline|env
		cat "$fio_extra_conf"
	elif [[ ! -t $fio_extra_conf ]]; then
		# Attached to stdin
		cat <&"$fio_extra_conf"
	fi

	cat <<- FIO
		[perf_test]
		stonewall