test/common: inline fio_config_add_job

The function is almost 20 lines long and it essentialy
appends two lines two a specified file. We don't need it.

Change-Id: I565de8e54aa71b04f15745456bec7b2b3b8fc178
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1288
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Darek Stojaczyk 2020-03-16 15:26:05 +01:00 committed by Tomasz Zawadzki
parent b5700d4d7c
commit 7098c65339
2 changed files with 4 additions and 21 deletions

View File

@ -157,7 +157,8 @@ function fio_test_suite() {
# Generate the fio config file given the list of all unclaimed bdevs
fio_config_gen $testdir/bdev.fio verify AIO
for b in $(echo $bdevs | jq -r '.name'); do
fio_config_add_job $testdir/bdev.fio $b
echo "[job_$b]" >> $testdir/bdev.fio
echo "filename=$b" >> $testdir/bdev.fio
done
if [ $RUN_NIGHTLY_FAILING -eq 0 ]; then
@ -177,7 +178,8 @@ function fio_test_suite() {
fio_config_gen $testdir/bdev.fio trim
if [ "$(echo $bdevs | jq -r 'select(.supported_io_types.unmap == true) | .name')" != "" ]; then
for b in $(echo $bdevs | jq -r 'select(.supported_io_types.unmap == true) | .name'); do
fio_config_add_job $testdir/bdev.fio $b
echo "[job_$b]" >> $testdir/bdev.fio
echo "filename=$b" >> $testdir/bdev.fio
done
else
rm -f $testdir/bdev.fio

View File

@ -987,25 +987,6 @@ EOL
fi
}
function fio_config_add_job()
{
config_file=$1
filename=$2
if [ ! -e "$config_file" ]; then
echo "Configuration File Doesn't Exist: $config_file"
return 1
fi
if [ -z "$filename" ]; then
echo "No filename provided"
return 1
fi
echo "[job_$filename]" >> $config_file
echo "filename=$filename" >> $config_file
}
function fio_bdev()
{
# Setup fio binary cmd line