From 7fd9632ad760a6e6dc2a19e29839e3f9f66188e9 Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Thu, 27 Oct 2022 09:41:46 -0400 Subject: tests: define loop image size as one variable Signed-off-by: Ming Lei --- tests/common/loop_common | 2 ++ tests/loop/001 | 2 +- tests/loop/002 | 2 +- tests/loop/003 | 2 +- tests/loop/004 | 2 +- tests/loop/006 | 2 +- tests/loop/007 | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/common/loop_common b/tests/common/loop_common index e80cd96..a625dd2 100755 --- a/tests/common/loop_common +++ b/tests/common/loop_common @@ -1,6 +1,8 @@ # SPDX-License-Identifier: MIT or GPL-2.0-only #!/bin/bash +export LO_IMG_SZ=1G + _create_loop_backing_file() { local my_size=$2 diff --git a/tests/loop/001 b/tests/loop/001 index de06b08..2e89ed8 100755 --- a/tests/loop/001 +++ b/tests/loop/001 @@ -4,7 +4,7 @@ . common/fio_common . common/loop_common -file=`_create_loop_backing_file "loop" 1G` +file=`_create_loop_backing_file "loop" $LO_IMG_SZ` export T_TYPE_PARAMS=" -f $file" __run_dev_perf "loop" 1 1 diff --git a/tests/loop/002 b/tests/loop/002 index a183a49..3ee53d7 100755 --- a/tests/loop/002 +++ b/tests/loop/002 @@ -4,7 +4,7 @@ . common/fio_common . common/loop_common -file=`_create_loop_backing_file "loop" 1G` +file=`_create_loop_backing_file "loop" $LO_IMG_SZ` export T_TYPE_PARAMS=" -f $file" __run_dev_perf "loop" 2 2 diff --git a/tests/loop/003 b/tests/loop/003 index db6c145..8cc0d40 100755 --- a/tests/loop/003 +++ b/tests/loop/003 @@ -4,7 +4,7 @@ . common/fio_common . common/loop_common -file=`_create_loop_backing_file "loop" 1G` +file=`_create_loop_backing_file "loop" $LO_IMG_SZ` __run_loop_dev_perf "kloop" 1 1 $file diff --git a/tests/loop/004 b/tests/loop/004 index a3dc84c..269166c 100755 --- a/tests/loop/004 +++ b/tests/loop/004 @@ -4,7 +4,7 @@ . common/fio_common . common/loop_common -file=`_create_loop_backing_file "loop" 1G` +file=`_create_loop_backing_file "loop" $LO_IMG_SZ` export T_TYPE_PARAMS=" -f $file" export T_URING_COMP=1 diff --git a/tests/loop/006 b/tests/loop/006 index d5518da..c414ced 100755 --- a/tests/loop/006 +++ b/tests/loop/006 @@ -3,7 +3,7 @@ . common/fio_common . common/loop_common -file=`_create_loop_backing_file "loop" 1G` +file=`_create_loop_backing_file "loop" $LO_IMG_SZ` export T_TYPE_PARAMS=" -f $file" export T_NEED_GET_DATA=1 diff --git a/tests/loop/007 b/tests/loop/007 index bc7c682..01e5263 100755 --- a/tests/loop/007 +++ b/tests/loop/007 @@ -4,7 +4,7 @@ . common/fio_common . common/loop_common -file=`_create_loop_backing_file "loop" 1G` +file=`_create_loop_backing_file "loop" $LO_IMG_SZ` export T_TYPE_PARAMS=" -f $file --buffered_io" __run_dev_perf "loop" 1 1 -- cgit v1.2.3-70-g09d2