Fix up test 071, exercising IO to files at the size boundary, add to auto QA group
authorfsgqa <fsgqa>
Tue, 22 Jul 2003 04:27:19 +0000 (04:27 +0000)
committerfsgqa <fsgqa>
Tue, 22 Jul 2003 04:27:19 +0000 (04:27 +0000)
071
071.out
group

diff --git a/071 b/071
index 84e0d34a029ef85382b6fabbcb78bc37275a776e..96deb8bfd1f63b89708eaff521852af0d5d490a6 100755 (executable)
--- a/071
+++ b/071
@@ -1,8 +1,7 @@
 #! /bin/sh
 # XFS QA Test No. 071
-# $Id: 071,v 1.1 2003/07/07 03:34:36 fsgqa Exp $
 #
-# Exercise IO at large file offsets (just terabytes for now).
+# Exercise IO at large file offsets.
 #
 #-----------------------------------------------------------------------
 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
@@ -58,23 +57,37 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
+_filter_io()
+{
+    sed -e "s/$dbsize/1FSB/g"
+}
+
+_filter_off()
+{
+    sed -e "s/$1/<OFFSET>/g" | _filter_io
+}
+
 write_block()
 {
     location=$1
-    offset=$2
-    bytes=$3
-    direct=$4
+    words=$2
+    offset=$3
+    bytes=$4
+    direct=$5
 
     [ `$direct` ] && flags=-d
 
-    echo "Writing $bytes bytes at $location (direct=$direct)" | tee -a $seq.full
-    xfs_io -c "pwrite $offset 512" $flags $SCRATCH_MNT/$seq
-
-    echo "Saving block map to $seq.full" | tee -a $seq.full
+    echo "Writing $bytes bytes, offset is $words (direct=$direct)" | _filter_io
+    echo "Writing $bytes bytes at $location $words (direct=$direct)" >>$seq.full
+    xfs_io -c "pwrite $offset 512" $flags $SCRATCH_MNT/$seq \
+       2>&1 | _filter_off $offset | tee -a $seq.full
     xfs_bmap -v $SCRATCH_MNT/$seq >>$seq.full
 
-    echo "Reading $bytes bytes at $location (direct=$direct)" | tee -a $seq.full
-    xfs_io -c "pread $offset $bytes" $flags $SCRATCH_MNT/$seq
+    echo "Reading $bytes bytes (direct=$direct)" | _filter_io
+    echo "Reading $bytes bytes at $location (direct=$direct)" >>$seq.full
+    xfs_io -c "pread $offset $bytes" $flags $SCRATCH_MNT/$seq \
+       2>&1 | _filter_off $offset | tee -a $seq.full
+
     xfs_io -c "pread -v $offset $bytes" $flags $SCRATCH_MNT/$seq >>$seq.full
 
     echo | tee -a $seq.full
@@ -87,31 +100,60 @@ source $tmp.mkfs
 echo
 _scratch_mount
 
-oneTB=`echo 1024 \* 1024 \* 1024 \* 1024 | bc`
-
-# Step from 1Tb through 16Tb, doing seek/writes/reads on each
-# boundary (using holey files), 1byte back from the boundary,
-# and 1FSB back from the boundary (and xfs_bmaps all the way).
+# Okay... filesize limit depends on blocksize, bits per long and
+# also if large block device patch is enabled (can't dynamically
+# check that, so use env var USE_LBD_PATCH to override default).
+# 
+# Note:
+# We check from 1Tb below our guessed limit to 1Tb above it, and
+# see what happens for each 1Tb increment along the way (first
+# half should succeed, second half should fail to create a file).
+# So, number calculated here is not the actual limit, its a ways
+# above that, hopefully.
+
+bitsperlong=`src/feature -w`
+if [ "$bitsperlong" -eq 32 ]; then
+    upperbound=`expr $dbsize / 512`
+    # which is 8(TB) for 4K, 4(TB) for 2k, ... etc.
+    [ "$USE_LBD_PATCH" = yes ] && upperbound=16
+    # limited by page cache index when LBD patch onboard.
+else
+    upperbound=`echo 16 \* 1024 \* 1024 | bc` 
+    # 16 exabytes (working in TBs below)
+fi
+
+# Step from (upperbound-1)(Tb) through (upperbound+1(Tb), &
+# seeks/writes/reads on each boundary (using holey files) -
+# 1byte back from the boundary, and 1FSB back from the same
+# boundary (and stash xfs_bmap output), before moving onto
+# each new test point.
 
 xfs_io -c "truncate 0" -f $SCRATCH_MNT/$seq
 
-count=1
-while [ $count -le 16 ]
+oneTB=`echo 1024 \* 1024 \* 1024 \* 1024 | bc`
+count=`expr $upperbound - 1`
+upperbound=`expr $upperbound + 1`
+
+while [ $count -le $upperbound ]
 do
     # buffered IO
     offset=`echo $oneTB \* $count | bc`
-    write_block "$count Tb" $offset 512 false
+    write_block $count "+0" $offset 512 false
     offset=`echo $oneTB \* $count \- 1 | bc`
-    write_block "$count Tb minus 1 byte" $offset 512 false
+    write_block $count "minus 1 byte" $offset 512 false
     offset=`echo $oneTB \* $count \- $dbsize | bc`
-    write_block "$count Tb minus 1 FSB" $offset 512 false
+    write_block $count "minus 1FSB" $offset 512 false
+    write_block $count "minus 1FSB" $offset 1 false
 
     # direct IO
     offset=`echo $oneTB \* $count | bc`
-    write_block "$count Tb" $offset $dbsize true
+    write_block $count "+0" $offset $dbsize true
     offset=`echo $oneTB \* $count \- 1 | bc`
-    write_block "$count Tb minus 1 FSB" $offset $dbsize true
+    write_block $count "minus 1FSB" $offset $dbsize true
 
+    echo === Iterating, `expr $upperbound - $count` remains
+    echo
+    echo
     count=`expr $count + 1`
 done
 
diff --git a/071.out b/071.out
index b3309e6234b8dc187b8b6d6940ff795246dae207..2ea0ef02a51ee5ba16bef75d854c24577885778a 100644 (file)
--- a/071.out
+++ b/071.out
@@ -6,33 +6,102 @@ naming   =VERN bsize=XXX
 log      =LDEV bsize=XXX blocks=XXX
 realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
 
-Writing 512 bytes at 1 Tb (direct=false)
-wrote 512/512 bytes at offset 1099511627776
-Saving block map to 071.full
-Reading 512 bytes at 1 Tb (direct=false)
-read 512/512 bytes at offset 1099511627776
-
-Writing 512 bytes at 1 Tb minus 1 byte (direct=false)
-wrote 512/512 bytes at offset 1099511627775
-Saving block map to 071.full
-Reading 512 bytes at 1 Tb minus 1 byte (direct=false)
-read 512/512 bytes at offset 1099511627775
-
-Writing 512 bytes at 1 Tb minus 1 FSB (direct=false)
-wrote 512/512 bytes at offset 1099511623680
-Saving block map to 071.full
-Reading 512 bytes at 1 Tb minus 1 FSB (direct=false)
-read 512/512 bytes at offset 1099511623680
-
-Writing 4096 bytes at 1 Tb (direct=true)
-wrote 512/512 bytes at offset 1099511627776
-Saving block map to 071.full
-Reading 4096 bytes at 1 Tb (direct=true)
-read 512/4096 bytes at offset 1099511627776
-
-Writing 4096 bytes at 1 Tb minus 1 FSB (direct=true)
-wrote 512/512 bytes at offset 1099511627775
-Saving block map to 071.full
-Reading 4096 bytes at 1 Tb minus 1 FSB (direct=true)
-read 513/4096 bytes at offset 1099511627775
+Writing 512 bytes, offset is +0 (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1 bytes (direct=false)
+read 1/1 bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1FSB bytes (direct=true)
+read 512/1FSB bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1FSB bytes (direct=true)
+read 513/1FSB bytes at offset <OFFSET>
+
+=== Iterating, 2 remains
+
+
+Writing 512 bytes, offset is +0 (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1 bytes (direct=false)
+read 1/1 bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+pwrite64: File too large
+Reading 1FSB bytes (direct=true)
+read 0/1FSB bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+pwrite64: File too large
+Reading 1FSB bytes (direct=true)
+read 0/1FSB bytes at offset <OFFSET>
+
+=== Iterating, 1 remains
+
+
+Writing 512 bytes, offset is +0 (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+pwrite64: File too large
+Reading 1 bytes (direct=false)
+read 0/1 bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+pwrite64: File too large
+Reading 1FSB bytes (direct=true)
+read 0/1FSB bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+pwrite64: File too large
+Reading 1FSB bytes (direct=true)
+read 0/1FSB bytes at offset <OFFSET>
+
+=== Iterating, 0 remains
+
 
diff --git a/group b/group
index 1db8a72de785d5a571c682aad15d0da2730f216a..10cb22cc9065b2bdbc1b0bf96a315b0bc1c121eb 100644 (file)
--- a/group
+++ b/group
@@ -128,6 +128,6 @@ ioctl               nathans@sgi.com
 068 other auto
 069 rw auto
 070 attr auto
-071 rw
+071 rw auto
 072 rw auto
 073 copy auto