From: Tim Shimmin Date: Tue, 10 Aug 2004 03:55:47 +0000 (+0000) Subject: xfs qa changes to get thinks working on irix X-Git-Tag: v1.1.0~801 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4c56e56f916f8f4d9461712032d51e473b603dd1;p=users%2Fhch%2Fxfstests-dev.git xfs qa changes to get thinks working on irix add verbosity to a file for debugging reduce iteration count --- diff --git a/013 b/013 index 2e0d74e16..2d0c71c7a 100755 --- a/013 +++ b/013 @@ -84,9 +84,9 @@ _do_test() echo "-----------------------------------------------" echo "fsstress.$_n : $_param" echo "-----------------------------------------------" - # -v >$tmp.out # -m limits number of users/groups so check doesn't fail (malloc) later - if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -m 8 -n $_count -d $out >/dev/null 2>&1 + dbgoutfile=$seq.full + if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1 then echo " fsstress (count=$_count) returned $? - see $seq.full" @@ -111,7 +111,7 @@ _setup_testdir rm -f $here/$seq.full echo "brevity is wit..." -count=2000 +count=1000 procs=20 _check_test_fs @@ -128,6 +128,9 @@ _do_test 2 "-p $procs -r" $count _do_test 3 "-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20" $count +# if all ok by here then probably don't need $seq.full +rm -f $seq.full + exit # Test with error injection: diff --git a/074 b/074 index 6d0876ecd..dacfb6ced 100755 --- a/074 +++ b/074 @@ -134,7 +134,7 @@ _supported_os IRIX Linux # so we set them differently for different machines # if [ $HOSTOS == "IRIX" ]; then - if uname -R | grep -i debug; then + if uname -R | grep -iq debug; then # e.g. getting around 37secs for 1,1,1 on IP30 debug numchildren=2 numloops=1 diff --git a/080 b/080 index acc5fd8e4..1269436be 100755 --- a/080 +++ b/080 @@ -64,6 +64,8 @@ _supported_fs xfs # It does not work on Linux due to some locking issues... _supported_os IRIX +[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet" + _setup_testdir #quiet=-q diff --git a/083 b/083 index c2300e7c3..cc1c5017c 100755 --- a/083 +++ b/083 @@ -7,6 +7,12 @@ # full boundary due to the fact that we will retry allocation # several times after flushing, before giving back ENOSPC. # +# Note that this test will intentionally cause console msgs of form: +# dksc0d1s4: Process [fsstress] ran out of disk space +# dksc0d1s4: Process [fsstress] ran out of disk space +# dksc0d1s4: Process [fsstress] ran out of disk space +# + #----------------------------------------------------------------------- # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. # @@ -75,6 +81,7 @@ workout() fsz=$1 ags=$2 procs=$3 + nops=$4 umount $SCRATCH_DEV >/dev/null 2>&1 echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seq.full @@ -84,16 +91,26 @@ workout() _scratch_mount >>$seq.full 2>&1 \ || _fail "mount failed" - ltp/fsstress -d $SCRATCH_MNT -w -p $procs -n 10000 $FSSTRESS_AVOID \ + # -w ensures that the only ops are ones which cause write I/O + ltp/fsstress -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID \ >>$seq.full _check_scratch_fs } echo "*** test out-of-space handling for random write operations" -# args: filesystem size/ag count/number fsstress processes +filesize=100m +agcount=6 +numprocs=15 + +if [ $HOSTOS = "IRIX" ]; then + # for 10000 ops was taking 30mins on my IRIX box + numops=1000 +else + numops=10000 +fi -workout 100m 6 15 +workout $filesize $agcount $numprocs $numops echo "*** done" status=0 diff --git a/084 b/084 index 99ddc3673..d1f859f27 100755 --- a/084 +++ b/084 @@ -53,7 +53,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 _filter_resv() { - sed -e "s,$TEST_DIR/resv,[TESTFILE],g" + sed -e "s,$TEST_DIR/resv,[TESTFILE],g" \ + -e 's/[0-9][0-9]* bytes/NUM bytes/g' } pgsize=`$here/src/feature -p` @@ -67,6 +68,14 @@ pgsize=`$here/src/feature -p` _supported_fs xfs _supported_os IRIX Linux +if [ $HOSTOS == "IRIX" ]; then + if uname -R | grep -iq debug; then + # taking up to 23 mins on my 512K octane on debug + # not worth worrying about + _notrun "don't bother running on debug IRIX" + fi +fi + echo echo "*** First case - I/O blocksize same as pagesize" $here/src/resvtest -i 20 -b $pgsize "$TEST_DIR/resv" | _filter_resv diff --git a/084.out b/084.out index 02d15b194..efaf4a290 100644 --- a/084.out +++ b/084.out @@ -1,9 +1,9 @@ QA output created by 084 *** First case - I/O blocksize same as pagesize -reserved 40960000 bytes for [TESTFILE] using XFS_IOC_RESVSP64 +reserved NUM bytes for [TESTFILE] using XFS_IOC_RESVSP64 done *** Second case - 512 byte I/O blocksize -reserved 40960000 bytes for [TESTFILE] using XFS_IOC_RESVSP64 +reserved NUM bytes for [TESTFILE] using XFS_IOC_RESVSP64 done diff --git a/091 b/091 index be5f6eb07..659b0eab6 100755 --- a/091 +++ b/091 @@ -54,6 +54,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 _supported_fs xfs _supported_os Linux IRIX +[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet" + rm -f $seq.full run_fsx() diff --git a/common.attr b/common.attr index 9bf1e4003..c3b3578da 100644 --- a/common.attr +++ b/common.attr @@ -74,6 +74,18 @@ _acl_ls() ls -ln $* | awk '{ print $1, $3, $4, $NF }' | _acl_filter_id } +# +_acl_list() +{ + _file1=$1 + + if [ $HOSTOS = "IRIX" ]; then + ls -D $_file1 | _acl_filter_id + else + chacl -l $_file1 | _acl_filter_id + fi +} + # create an ACL with n ACEs in it # _create_n_aces() diff --git a/common.log b/common.log index 84af5860a..3f277db51 100644 --- a/common.log +++ b/common.log @@ -398,11 +398,11 @@ _cmp_output() _process_op_diff() { $AWK_PROG <$1 ' - BEGIN { num_splits = 1 } + BEGIN { num_splits = 1; max_splits = 50 } /^[0-9]/ { # ensure a split happened in previous difference - if (num_splits < 1 || num_splits > 3) { + if (num_splits < 1 || num_splits > max_splits) { print num_splits, " split(s) found prior to diff cmd: ", $0 num_splits = 1 # shut-up end condition exit 1 @@ -417,7 +417,7 @@ _process_op_diff() } { next } END { - if (num_splits < 1 || num_splits > 3) { + if (num_splits < 1 || num_splits > max_splits) { print num_splits, " split(s) found prior to diff end" exit 1 } diff --git a/ltp/fsstress.c b/ltp/fsstress.c index b19e4e201..e787f1014 100644 --- a/ltp/fsstress.c +++ b/ltp/fsstress.c @@ -40,6 +40,11 @@ #define XFS_ERRTAG_MAX 17 #define XFS_IDMODULO_MAX 32 +/* was (getpagesize()*32) BUT want it to be same + * on all platforms + */ +#define FILELEN_MAX (32*4096) + typedef enum { OP_ALLOCSP, OP_ATTR_REMOVE, @@ -1737,7 +1742,7 @@ dread_f(int opno, long r) off = (off64_t)(lr % stb.st_size); off -= (off % align); lseek64(fd, off, SEEK_SET); - len = (random() % (getpagesize() * 32)) + 1; + len = (random() % FILELEN_MAX) + 1; len -= (len % align); if (len <= 0) len = align; @@ -1807,7 +1812,7 @@ dwrite_f(int opno, long r) off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE)); off -= (off % align); lseek64(fd, off, SEEK_SET); - len = (random() % (getpagesize() * 32)) + 1; + len = (random() % FILELEN_MAX) + 1; len -= (len % align); if (len <= 0) len = align; @@ -2139,7 +2144,7 @@ read_f(int opno, long r) lr = ((__int64_t)random() << 32) + random(); off = (off64_t)(lr % stb.st_size); lseek64(fd, off, SEEK_SET); - len = (random() % (getpagesize() * 32)) + 1; + len = (random() % FILELEN_MAX) + 1; buf = malloc(len); e = read(fd, buf, len) < 0 ? errno : 0; free(buf); @@ -2539,7 +2544,7 @@ write_f(int opno, long r) off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE)); off %= maxfsize; lseek64(fd, off, SEEK_SET); - len = (random() % (getpagesize() * 32)) + 1; + len = (random() % FILELEN_MAX) + 1; buf = malloc(len); memset(buf, nameseq & 0xff, len); e = write(fd, buf, len) < 0 ? errno : 0; diff --git a/src/global.h b/src/global.h index 4680ef367..abe3f18ea 100644 --- a/src/global.h +++ b/src/global.h @@ -239,7 +239,8 @@ xfsctl(char* path, int fd, int cmd, void* arg) { return syssgi(SGI_FS_BULKSTAT, fd, ((xfs_fsop_bulkreq_t*)arg)->lastip, ((xfs_fsop_bulkreq_t*)arg)->icount, - ((xfs_fsop_bulkreq_t*)arg)->ubuffer); + ((xfs_fsop_bulkreq_t*)arg)->ubuffer, + ((xfs_fsop_bulkreq_t*)arg)->ocount); else if (cmd == SGI_FS_BULKSTAT_SINGLE) return syssgi(SGI_FS_BULKSTAT_SINGLE, fd, ((xfs_fsop_bulkreq_t*)arg)->lastip,