From: Shin'ichiro Kawasaki Date: Mon, 28 Jan 2019 13:14:45 +0000 (+0900) Subject: common: Introduce _have_fio_zbd_zonemode() helper function X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3095d6a0e10085459e6116e04df59e40dd39d224;p=users%2Fsagi%2Fblktests.git common: Introduce _have_fio_zbd_zonemode() helper function Fio zbd zone mode is necessary for zoned block devices. Introduce the helper function _have_fio_zbd_zonemode() to check that the installed fio version supports the option --zonemode=zbd. Signed-off-by: Shin'ichiro Kawasaki --- diff --git a/common/fio b/common/fio index e407088..2b4f6e2 100644 --- a/common/fio +++ b/common/fio @@ -17,6 +17,15 @@ _have_fio() { return 0 } +_have_fio_zbd_zonemode() { + _have_fio || return $? + if ! fio --cmdhelp=zonemode 2>&1 | grep -q zbd; then + SKIP_REASON="Fio version too old (does not support --zonemode=zbd)" + return 1 + fi + return 0 +} + declare -A FIO_TERSE_FIELDS FIO_TERSE_FIELDS=( # Read status