Reduce a param to get it working in a more reasonable time on irix.
else
# getting around 1 sec 1,1,1 - 10secs 1,10,1 on IP30 nondebug
numloops=2
- numfiles=5
+ numfiles=3
numchildren=3
param_type="IRIX nondebug"
fi
exit
fi
+ _filter_param=`echo "$_param" | sed\
+ -e 's/-N [0-9][0-9]*/-N numops/' \
+ -e 's/-l [0-9][0-9]*/-l filelen/'`
+
echo ""
echo "-----------------------------------------------"
- echo "fsx.$_n : $_param"
+ echo "fsx.$_n : $_filter_param"
echo "-----------------------------------------------"
if [ "$FSTYP" = "nfs" ]
_check_test_fs
}
+_usage()
+{
+ echo "$0: [-l filelen] [-n numops1] [-N numops2]"
+}
+
+_process_args()
+{
+ while getopts "l:n:N:?" c $@
+ do
+ case $c
+ in
+ l)
+ filelen=$OPTARG
+ param_type="$param_type, overidde -l"
+ ;;
+ N)
+ numops2=$OPTARG
+ param_type="$param_type, overidde -N"
+ ;;
+ n)
+ numops1=$OPTARG
+ param_type="$param_type, overidde -n"
+ ;;
+ ?)
+ _usage
+ exit
+ ;;
+ esac
+ done
+}
+
# real QA test starts here
_supported_fs xfs udf nfs
_supported_os IRIX Linux
+size10=`expr 10 \* 1024 \* 1024` # 10 megabytes
+filelen=$size10
+numops1=1000
+numops2=10000
+
+# can override the params here
+_process_args "$@"
+
+echo "Params are for $param_type" >>$seq.full
+echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seq.full
+
_setup_testdir
rm -f $here/$seq.full
# -S seed: for random # generator (default 1) 0 gets timestamp
# -x: pre-allocate file space, exercising unwritten extents
-size10=`expr 10 \* 1024 \* 1024` # 10 megabytes
-
-_do_test 0 "-d -N 1000 -S 0"
-_do_test 1 "-d -N 1000 -S 0 -x"
-_do_test 2 "-d -N 25000 -l $size10 -S 0"
-_do_test 3 "-d -N 25000 -l $size10 -S 0 -x"
+_do_test 0 "-d -N $numops1 -S 0"
+_do_test 1 "-d -N $numops1 -S 0 -x"
+_do_test 2 "-d -N $numops2 -l $filelen -S 0"
+_do_test 3 "-d -N $numops2 -l $filelen -S 0 -x"
rm -f $seq.*.fsx{good,log}
exit 0
brevity is wit...
-----------------------------------------------
-fsx.0 : -d -N 1000 -S 0
+fsx.0 : -d -N numops -S 0
-----------------------------------------------
-----------------------------------------------
-fsx.1 : -d -N 1000 -S 0 -x
+fsx.1 : -d -N numops -S 0 -x
-----------------------------------------------
-----------------------------------------------
-fsx.2 : -d -N 25000 -l 10485760 -S 0
+fsx.2 : -d -N numops -l filelen -S 0
-----------------------------------------------
-----------------------------------------------
-fsx.3 : -d -N 25000 -l 10485760 -S 0 -x
+fsx.3 : -d -N numops -l filelen -S 0 -x
-----------------------------------------------
}
_supported_fs xfs
-_supported_os IRIX Linux
+
+# Apparently should be able to work on IRIX,
+# but not at the moment.
+# It does not work on Linux due to some locking issues...
+_supported_os IRIX
_setup_testdir
-quiet=-q
+#quiet=-q
clean=-c
export here
# real QA test starts here
+# to get sh working like ksh on IRIX
+export _XPG=1
+
$here/ltp/rwtest.sh $quiet $clean -i 2000 -f direct,buffered,sync
status=$?
[ $status -ne 0 ] && exit
fi
size=${size%%\%*}
- case $(uname) in
- IRIX*)
- echo $blke
- #sz=$( perl -le 'print int( "$blke" * "$size" / 100 )' )
- ;;
- *)
- #sz=$(expr \( $blks '*' $size \) / 100)
- ;;
- esac
+ sz=$(expr \( $blks '*' $size \) / 100)
if [[ $sz -gt $max ]]
then
nametest permname randholes runas truncfile usemem \
mmapcat append_reader append_writer dirperf metaperf \
devzero feature alloc fault fstest t_access_root \
- godown
+ godown resvtest
-LINUX_TARGETS = loggen xfsctl resvtest bstat t_mtab
+LINUX_TARGETS = loggen xfsctl bstat t_mtab
ifeq ($(PKG_PLATFORM),linux)
TARGETS += $(LINUX_TARGETS)
resvsp.l_whence = 0;
resvsp.l_start = 0;
resvsp.l_len = resvsize;
- if (ioctl(writefd, XFS_IOC_RESVSP64, &resvsp) < 0) {
+ if (xfsctl(filename, writefd, XFS_IOC_RESVSP64, &resvsp) < 0) {
fprintf(stdout, "attempt to reserve %lld bytes for %s "
"using %s failed: %s (%d)\n",
(long long int)resvsize, filename, "XFS_IOC_RESVSP64",