From f4be25b783d9b9c8235410a321a7172524773004 Mon Sep 17 00:00:00 2001 From: zab Date: Mon, 2 Feb 2004 18:31:22 +0000 Subject: [PATCH] - add an argument to select which tests to run --- lustre/scripts/bdev-io-survey.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lustre/scripts/bdev-io-survey.sh b/lustre/scripts/bdev-io-survey.sh index 229db61..2d092ac 100755 --- a/lustre/scripts/bdev-io-survey.sh +++ b/lustre/scripts/bdev-io-survey.sh @@ -24,6 +24,8 @@ cur_y="0" # defaults for some options: min_threads=1 max_threads=4 +possible_tests="sgp_dd ext2_iozone echo_filter" +run_tests="$possible_tests" # optional output directory output_dir="" @@ -100,6 +102,7 @@ usage() { echo " -l " echo " -t " echo " -T " + echo " -r " exit; } @@ -645,11 +648,12 @@ test_iterator() { return $rc; } -while getopts ":d:b:l:t:T:" opt; do +while getopts ":d:b:l:t:T:r:" opt; do case $opt in b) block=$OPTARG ;; d) output_dir=$OPTARG ;; l) io_len=$OPTARG ;; + r) run_tests=$OPTARG ;; t) min_threads=$OPTARG ;; T) max_threads=$OPTARG ;; \?) usage @@ -669,6 +673,14 @@ fi block=`echo $block | sed -e 's/,/ /g'` [ -z "$block" ] && usage "need block devices" +run_tests=`echo $run_tests | sed -e 's/,/ /g'` +[ -z "$run_tests" ] && usage "need to specify tests to run with -r" +for t in $run_tests; do + if ! echo $possible_tests | grep -q $t ; then + die "$t isn't one of the possible tests: $possible_tests" + fi +done + [ $min_threads -gt $max_threads ] && \ die "min threads $min_threads must be <= min_threads $min_threads" @@ -684,10 +696,9 @@ tmpdir=`mktemp -d /tmp/.surveyXXXXXX` || die "couldn't create tmp dir" echo each test will operate on $io_len"k" -tests="sgp_dd ext2_iozone echo_filter" test_results="" -for t in $tests; do +for t in $run_tests; do table_set $t 0 0 "T" table_set $t 1 0 "L" -- 1.8.3.1