xfstests: add fio requirement V2

FIO is very flexible io generator, I would call it IO swiss knife.
Currently we have tons of hardcoded application which reproduces
some predefined scenario. This approach has obvious disadvantages
1) Lack of flexibility: one written it is hard to modify it in future
2) Code base is large, many routines written again and again

At the same time add new fio based test, just add simple INI file.
This greatly simplifies code review. I do believe that some day we will
replace most of hardcoded io binaries with fio.

One who is planning to run $FIO_PROG should first check that system
contains appropriate version which is able to handle jobfile
for example:  _require_fio 286-job.fio

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Dmitry Monakhov
2013-02-20 10:42:06 +00:00
committed by Rich Johnston
parent 76765b7e4e
commit b3db6021fc
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -160,6 +160,7 @@ export INDENT_PROG="`set_prog_path indent`"
export XFS_COPY_PROG="`set_prog_path xfs_copy`"
export FSTRIM_PROG="`set_prog_path fstrim`"
export DUMPE2FS_PROG="`set_prog_path dumpe2fs`"
export FIO_PROG="`set_prog_path fio`"
# Generate a comparable xfsprogs version number in the form of
# major * 10000 + minor * 100 + release
+14
View File
@@ -1780,6 +1780,20 @@ _require_btrfs()
[ $? -eq 0 ] || _notrun "$BTRFS_UTIL_PROG too old (must support $cmd)"
}
# Check that fio is present, and it is able to execute given jobfile
_require_fio()
{
job=$1
_require_command $FIO_PROG
if [ -z "$1" ]; then
return 1;
fi
$FIO_PROG --warnings-fatal --showcmd $job >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "$FIO_PROG too old"
}
# Does freeze work on this fs?
_require_freeze()
{