]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
Make 074 finish in a reasonable time on IRIX (also on Linux).
authorTim Shimmin <tes@sgi.com>
Tue, 27 Jul 2004 05:53:41 +0000 (05:53 +0000)
committerTim Shimmin <tes@sgi.com>
Tue, 27 Jul 2004 05:53:41 +0000 (05:53 +0000)
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.

074
074.out
074.out.irix [deleted file]
074.out.linux [deleted file]
common.rc

diff --git a/074 b/074
index 8f9d4721cceca43511980df4fc8732669494edb4..980fc9b1fe71a9cf949d21a693dc3a2e4c74e7a3 100755 (executable)
--- 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4a1d5dbef44d7646d9e0dbb3928049c8ef1a63ca 100644 (file)
--- 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 (executable)
index c1395bb..0000000
+++ /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 (executable)
index c1395bb..0000000
+++ /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
------------------------------------------------
index ffd744a05cb1233b11d01df43959cc910af3bfcb..bcb720e83724d5d27b71ff33211e3bf4462e3106 100644 (file)
--- 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