From: Tim Shimmin Date: Tue, 27 Jul 2004 05:53:41 +0000 (+0000) Subject: Make 074 finish in a reasonable time on IRIX (also on Linux). X-Git-Tag: v1.1.0~809 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0b6c2dc5b6aa3aef55ef1ecf0f68c1b3c65c68d2;p=users%2Fhch%2Fxfstests-dev.git Make 074 finish in a reasonable time on IRIX (also on Linux). Want this to run in a reasonable time. Make it have different params on IRIX vs Linux, debug versus non-debug. And allow cmd arguments via getopt to try out different params for timing. --- diff --git a/074 b/074 index 8f9d4721c..980fc9b1f 100755 --- a/074 +++ b/074 @@ -57,9 +57,6 @@ _cleanup() . ./common.rc . ./common.filter -# link correct .out file -_link_out_file $seq.out - _do_test() { _n="$1" @@ -73,12 +70,17 @@ _do_test() status=1 exit fi + + _filter_param=`echo "$_param" | sed\ + -e 's/-n [0-9][0-9]*/-n children/' \ + -e 's/-l [0-9][0-9]*/-l loops/' \ + -e 's/-f [0-9][0-9]*/-f files/'` echo "" echo "-----------------------------------------------" - echo "fstest.$_n : $_param" + echo "fstest.$_n : $_filter_param" echo "-----------------------------------------------" - if ! $here/src/fstest $_param -p $out >> $seq.full + if ! $here/src/fstest $_param -p $out >>$seq.full then echo " fstest ($_param) returned $? - see $seq.full" status=1 @@ -88,15 +90,82 @@ _do_test() _check_test_fs } +_usage() +{ + echo "$0: [-f files] [-l loops] [-n children]" +} + +_process_args() +{ + while getopts "f:l:n:?" c $@ + do + case $c + in + f) + numfiles=$OPTARG + param_type="$param_type, overidde -f" + ;; + l) + numloops=$OPTARG + param_type="$param_type, overidde -l" + ;; + n) + numchildren=$OPTARG + param_type="$param_type, overidde -n" + ;; + ?) + _usage + exit + ;; + esac + done +} + # real QA test starts here +rm -f $here/$seq.full + _supported_fs xfs udf nfs _supported_os IRIX Linux -_setup_testdir +# +# set params +# These params can take a while on different CPUs/OSs +# so we set them differently for different machines +# +if [ $HOSTOS == "IRIX" ]; then + if uname -R | grep -i debug; then + # e.g. getting around 37secs for 1,1,1 on IP30 debug + numchildren=2 + numloops=1 + numfiles=2 + param_type="IRIX debug" + else + # getting around 1 sec 1,1,1 - 10secs 1,10,1 on IP30 nondebug + numloops=2 + numfiles=5 + numchildren=3 + param_type="IRIX nondebug" + fi +elif [ $HOSTOS == "Linux" ]; then + numloops=10 + numfiles=5 + numchildren=3 + param_type="Linux" +else + numloops=1 + numfiles=1 + numchildren=1 + param_type="Default" +fi + +# can override the params here +_process_args "$@" + +echo "Params are for $param_type" >>$seq.full +echo "Params: n = $numchildren l = $numloops f = $numfiles" >>$seq.full -rm -f $here/$seq.full -echo "brevity is wit..." +_setup_testdir _check_test_fs @@ -114,10 +183,10 @@ _check_test_fs size10=`expr 10 \* 1024 \* 1024` # 10 megabytes size30=`expr 30 \* 1024 \* 1024` # 30 megabytes -_do_test 0 "" # defaults +_do_test 0 "-l $numloops" -_do_test 1 "-s $size10 -b 8192 -m" +_do_test 1 "-l $numloops -s $size10 -b 8192 -m" -_do_test 2 "-n 3 -Fp -f 10 -s $size30 -b 512" -_do_test 3 "-n 3 -Fp -f 10 -s $size30 -b 512 -m" +_do_test 2 "-n $numchildren -F -l $numloops -f $numfiles -s $size30 -b 512" +_do_test 3 "-n $numchildren -F -l $numloops -f $numfiles -s $size30 -b 512 -m" diff --git a/074.out b/074.out index e69de29bb..4a1d5dbef 100644 --- a/074.out +++ b/074.out @@ -0,0 +1,17 @@ +QA output created by 074 + +----------------------------------------------- +fstest.0 : -l loops +----------------------------------------------- + +----------------------------------------------- +fstest.1 : -l loops -s 10485760 -b 8192 -m +----------------------------------------------- + +----------------------------------------------- +fstest.2 : -n children -F -l loops -f files -s 31457280 -b 512 +----------------------------------------------- + +----------------------------------------------- +fstest.3 : -n children -F -l loops -f files -s 31457280 -b 512 -m +----------------------------------------------- diff --git a/074.out.irix b/074.out.irix deleted file mode 100755 index c1395bbb8..000000000 --- a/074.out.irix +++ /dev/null @@ -1,18 +0,0 @@ -QA output created by 074 -brevity is wit... - ------------------------------------------------ -fstest.0 : ------------------------------------------------ - ------------------------------------------------ -fstest.1 : -s 10485760 -b 8192 -m ------------------------------------------------ - ------------------------------------------------ -fstest.2 : -n 3 -Fp -f 10 -s 31457280 -b 512 ------------------------------------------------ - ------------------------------------------------ -fstest.3 : -n 3 -Fp -f 10 -s 31457280 -b 512 -m ------------------------------------------------ diff --git a/074.out.linux b/074.out.linux deleted file mode 100755 index c1395bbb8..000000000 --- a/074.out.linux +++ /dev/null @@ -1,18 +0,0 @@ -QA output created by 074 -brevity is wit... - ------------------------------------------------ -fstest.0 : ------------------------------------------------ - ------------------------------------------------ -fstest.1 : -s 10485760 -b 8192 -m ------------------------------------------------ - ------------------------------------------------ -fstest.2 : -n 3 -Fp -f 10 -s 31457280 -b 512 ------------------------------------------------ - ------------------------------------------------ -fstest.3 : -n 3 -Fp -f 10 -s 31457280 -b 512 -m ------------------------------------------------ diff --git a/common.rc b/common.rc index ffd744a05..bcb720e83 100644 --- a/common.rc +++ b/common.rc @@ -958,6 +958,7 @@ _cleanup_testdir() case $FSTYP in xfs) # do nothing, testdir is $TEST_DIR + : ;; udf) # umount testdir as it is $SCRATCH_MNT which could be used by xfs next