diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index f70637617..d90d643b7 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -189,6 +189,21 @@ if [ -z "$output_dir" ]; then export output_dir fi +TEST_MODE= +for i in "$@"; do + case "$i" in + --iso) + TEST_MODE=iso + ;; + --transport=*) + TEST_TRANSPORT="${i#*=}" + ;; + --sock=*) + TEST_SOCK="${i#*=}" + ;; + esac +done + function timing() { direction="$1" testname="$2" @@ -236,23 +251,6 @@ function timing_finish() { fi } -function parse_common_script_args() { - TEST_MODE= - for i in "$@"; do - case "$i" in - --iso) - TEST_MODE=iso - ;; - --transport=*) - TEST_TRANSPORT="${i#*=}" - ;; - --sock=*) - TEST_SOCK="${i#*=}" - ;; - esac - done -} - function create_test_list() { grep -rshI --exclude="autotest_common.sh" --exclude="$rootdir/test/common/autotest_common.sh" -e "report_test_completion" $rootdir | sed 's/report_test_completion//g; s/[[:blank:]]//g; s/"//g;' > $output_dir/all_tests.txt || true } diff --git a/test/iscsi_tgt/bdev_io_wait/bdev_io_wait.sh b/test/iscsi_tgt/bdev_io_wait/bdev_io_wait.sh index bdc1cd547..28fa03988 100755 --- a/test/iscsi_tgt/bdev_io_wait/bdev_io_wait.sh +++ b/test/iscsi_tgt/bdev_io_wait/bdev_io_wait.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/iscsi_tgt/common.sh -parse_common_script_args $@ - iscsitestinit $1 $2 timing_enter bdev_io_wait diff --git a/test/nvmf/host/aer.sh b/test/nvmf/host/aer.sh index 1e603b5b2..1c3d55aa3 100755 --- a/test/nvmf/host/aer.sh +++ b/test/nvmf/host/aer.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - rpc_py="$rootdir/scripts/rpc.py" set -e diff --git a/test/nvmf/host/bdevperf.sh b/test/nvmf/host/bdevperf.sh index 560e057a8..d16ec4a52 100755 --- a/test/nvmf/host/bdevperf.sh +++ b/test/nvmf/host/bdevperf.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/host/fio.sh b/test/nvmf/host/fio.sh index 711878aed..ce3c82c0f 100755 --- a/test/nvmf/host/fio.sh +++ b/test/nvmf/host/fio.sh @@ -6,8 +6,6 @@ source $rootdir/test/common/autotest_common.sh source $rootdir/scripts/common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - rpc_py="$rootdir/scripts/rpc.py" set -e diff --git a/test/nvmf/host/identify.sh b/test/nvmf/host/identify.sh index 8a44c2d9d..699d83cd4 100755 --- a/test/nvmf/host/identify.sh +++ b/test/nvmf/host/identify.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/host/identify_kernel_nvmf.sh b/test/nvmf/host/identify_kernel_nvmf.sh index e55801d2c..ccd99c0ce 100755 --- a/test/nvmf/host/identify_kernel_nvmf.sh +++ b/test/nvmf/host/identify_kernel_nvmf.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - set -e nvmftestinit diff --git a/test/nvmf/host/perf.sh b/test/nvmf/host/perf.sh index 09186701f..f4126bee3 100755 --- a/test/nvmf/host/perf.sh +++ b/test/nvmf/host/perf.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/bdev_io_wait.sh b/test/nvmf/target/bdev_io_wait.sh index 1efa77a14..ce804437b 100755 --- a/test/nvmf/target/bdev_io_wait.sh +++ b/test/nvmf/target/bdev_io_wait.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/bdevio.sh b/test/nvmf/target/bdevio.sh index 0454a9f2d..9cedb396e 100755 --- a/test/nvmf/target/bdevio.sh +++ b/test/nvmf/target/bdevio.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/connect_disconnect.sh b/test/nvmf/target/connect_disconnect.sh index 6f0cd133b..f642cb4ca 100755 --- a/test/nvmf/target/connect_disconnect.sh +++ b/test/nvmf/target/connect_disconnect.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/create_transport.sh b/test/nvmf/target/create_transport.sh index 1c47d36d0..2d0f203ed 100755 --- a/test/nvmf/target/create_transport.sh +++ b/test/nvmf/target/create_transport.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - NULL_BDEV_SIZE=102400 NULL_BLOCK_SIZE=512 diff --git a/test/nvmf/target/discovery.sh b/test/nvmf/target/discovery.sh index 52b3c0442..4ff6b1379 100755 --- a/test/nvmf/target/discovery.sh +++ b/test/nvmf/target/discovery.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - NULL_BDEV_SIZE=102400 NULL_BLOCK_SIZE=512 diff --git a/test/nvmf/target/filesystem.sh b/test/nvmf/target/filesystem.sh index e0eb59ace..b1eb5106f 100755 --- a/test/nvmf/target/filesystem.sh +++ b/test/nvmf/target/filesystem.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/fio.sh b/test/nvmf/target/fio.sh index fff49e27f..1ef3f72f0 100755 --- a/test/nvmf/target/fio.sh +++ b/test/nvmf/target/fio.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/multiconnection.sh b/test/nvmf/target/multiconnection.sh index 4bad57b9e..df16bbab2 100755 --- a/test/nvmf/target/multiconnection.sh +++ b/test/nvmf/target/multiconnection.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/nmic.sh b/test/nvmf/target/nmic.sh index f855da38b..806979fef 100755 --- a/test/nvmf/target/nmic.sh +++ b/test/nvmf/target/nmic.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/nvme_cli.sh b/test/nvmf/target/nvme_cli.sh index b1c7d0780..08716200b 100755 --- a/test/nvmf/target/nvme_cli.sh +++ b/test/nvmf/target/nvme_cli.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - if [ -z "${DEPENDENCY_DIR}" ]; then echo DEPENDENCY_DIR not defined! exit 1 diff --git a/test/nvmf/target/nvmf_lvol.sh b/test/nvmf/target/nvmf_lvol.sh index a083bf129..e6cfce62d 100755 --- a/test/nvmf/target/nvmf_lvol.sh +++ b/test/nvmf/target/nvmf_lvol.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 LVOL_BDEV_INIT_SIZE=20 diff --git a/test/nvmf/target/rpc.sh b/test/nvmf/target/rpc.sh index d0b5dd223..173101a2d 100755 --- a/test/nvmf/target/rpc.sh +++ b/test/nvmf/target/rpc.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - rpc_py="$rootdir/scripts/rpc.py" set -e diff --git a/test/nvmf/target/shutdown.sh b/test/nvmf/target/shutdown.sh index 8473a5a6c..75ac2bed5 100755 --- a/test/nvmf/target/shutdown.sh +++ b/test/nvmf/target/shutdown.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 diff --git a/test/nvmf/target/srq_overwhelm.sh b/test/nvmf/target/srq_overwhelm.sh index 5b323ee0a..18e715c15 100755 --- a/test/nvmf/target/srq_overwhelm.sh +++ b/test/nvmf/target/srq_overwhelm.sh @@ -5,8 +5,6 @@ rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/nvmf/common.sh -parse_common_script_args $@ - MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512