From: Tim Shimmin Date: Thu, 5 Aug 2004 06:39:05 +0000 (+0000) Subject: Some qa changes to get more tests working on IRIX. X-Git-Tag: v1.1.0~803 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae2e4eed5928a823755688d65ed227e12505423c;p=xfstests-dev.git Some qa changes to get more tests working on IRIX. Reduce a param to get it working in a more reasonable time on irix. --- diff --git a/074 b/074 index 980fc9b1..6d0876ec 100755 --- a/074 +++ b/074 @@ -143,7 +143,7 @@ if [ $HOSTOS == "IRIX" ]; then 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 diff --git a/075 b/075 index 2ecbca29..fdedce2d 100755 --- a/075 +++ b/075 @@ -71,9 +71,13 @@ _do_test() 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" ] @@ -99,11 +103,53 @@ _do_test() _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 @@ -120,12 +166,10 @@ _check_test_fs # -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 diff --git a/075.out b/075.out index dea8cbb6..1f81cdf0 100644 --- a/075.out +++ b/075.out @@ -2,17 +2,17 @@ QA output created by 075 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 ----------------------------------------------- diff --git a/080 b/080 index 548df04e..acc5fd8e 100755 --- a/080 +++ b/080 @@ -58,11 +58,15 @@ _cleanup() } _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 @@ -71,6 +75,9 @@ echo # 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 diff --git a/ltp/rwtest.sh b/ltp/rwtest.sh index c7c738d3..5e358ab4 100755 --- a/ltp/rwtest.sh +++ b/ltp/rwtest.sh @@ -335,15 +335,7 @@ do 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 diff --git a/src/Makefile b/src/Makefile index 18a53449..e8a8998a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -37,9 +37,9 @@ TARGETS = dirstress fill fill2 getpagesize holes lstat64 \ 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) diff --git a/src/resvtest.c b/src/resvtest.c index 66fe5084..037d9ea9 100644 --- a/src/resvtest.c +++ b/src/resvtest.c @@ -91,7 +91,7 @@ main(int argc, char **argv) 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",