diff --git a/scripts/perf/vhost/run_vhost_test.sh b/scripts/perf/vhost/run_vhost_test.sh index 6452f8ab7..4093fe56d 100755 --- a/scripts/perf/vhost/run_vhost_test.sh +++ b/scripts/perf/vhost/run_vhost_test.sh @@ -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