4 # fsx (non-AIO variant)
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
18 status=0 # success is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
24 rm -rf $testdir/fsx.* $tmp.*
28 # get standard environment, filters and checks
41 echo " failed to mkdir $out"
46 _filter_param=`echo "$_param" | sed\
47 -e 's/-N [0-9][0-9]*/-N numops/' \
48 -e 's/-l [0-9][0-9]*/-l filelen/'`
51 echo "-----------------------------------------------"
52 echo "fsx.$_n : $_filter_param"
53 echo "-----------------------------------------------"
55 if [ "$FSTYP" = "nfs" ]
57 if [ "$_n" = "1" -o "$_n" = "3" ]
59 # HACK: nfs don't handle preallocation (-x) so just skip this test
64 # This cd and use of -P gets full debug on $here (not TEST_DEV)
66 if ! $here/ltp/fsx $_param -P $here $seq.$_n >/dev/null
68 echo " fsx ($_param) failed, $? - compare $seq.$_n.{good,bad,fsxlog}"
69 mv $out/$seq.$_n $here/$seq.$_n.full
70 od -xAx $here/$seq.$_n.full > $here/$seq.$_n.bad
71 od -xAx $here/$seq.$_n.fsxgood > $here/$seq.$_n.good
82 echo "$0: [-l filelen] [-n numops1] [-N numops2]"
87 while getopts "l:n:N:?" c $@
93 param_type="$param_type, overidde -l"
97 param_type="$param_type, overidde -N"
101 param_type="$param_type, overidde -n"
112 # real QA test starts here
113 _supported_fs xfs udf nfs
114 _supported_os IRIX Linux
116 size10=`expr 10 \* 1024 \* 1024` # 10 megabytes
121 # can override the params here
124 echo "Params are for $param_type" >>$seq.full
125 echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seq.full
129 rm -f $here/$seq.full
130 echo "brevity is wit..."
135 # -d: debug output for all operations
136 # -l flen: the upper bound on file size (default 262144)
137 # -o oplen: the upper bound on operation size
138 # -N numops: total # operations to do (default infinity)
139 # -P: save .fsxlog and .fsxgood files in dirpath (default ./)
140 # -S seed: for random # generator (default 1) 0 gets timestamp
141 # -x: pre-allocate file space, exercising unwritten extents
143 _do_test 0 "-d -N $numops1 -S 0"
144 _do_test 1 "-d -N $numops1 -S 0 -x"
145 _do_test 2 "-d -N $numops2 -l $filelen -S 0"
146 _do_test 3 "-d -N $numops2 -l $filelen -S 0 -x"
148 rm -f $seq.*.fsx{good,log}