From 7098c653395d756d5385c90de98d25eb4d8aaf08 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Mon, 16 Mar 2020 15:26:05 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1288 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- test/bdev/blockdev.sh | 6 ++++-- test/common/autotest_common.sh | 19 ------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/test/bdev/blockdev.sh b/test/bdev/blockdev.sh index c89449b37a..d02445817e 100755 --- a/test/bdev/blockdev.sh +++ b/test/bdev/blockdev.sh @@ -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 diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index f2ecee1f8c..22609fa7f0 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -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