Fixed merge problems

This commit is contained in:
ptools
2004-06-15 07:32:36 +00:00
parent 2c3b0bab9f
commit cb6beb9759
144 changed files with 2372 additions and 2383 deletions
+36 -14
View File
@@ -1,9 +1,8 @@
#! /bin/sh #! /bin/sh
# # FS QA Test No. 001
# XFS QA Test No. 001
# #
# Random file copier to produce chains of identical files so the head # Random file copier to produce chains of identical files so the head
# and the tail cna be diff'd at then end of each iteration. # and the tail can be diff'd at the end of each iteration.
# #
# Exercises creat, write and unlink for a variety of directory sizes, and # Exercises creat, write and unlink for a variety of directory sizes, and
# checks for data corruption. # checks for data corruption.
@@ -62,8 +61,11 @@ done_cleanup=false
trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15 trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
# real QA test starts here # real QA test starts here
_supported_fs xfs udf nfs
_supported_os IRIX Linux
verbose=true verbose=true
verify=$here/verify_fill
if [ $# -eq 0 ] if [ $# -eq 0 ]
then then
@@ -127,17 +129,18 @@ else
fi fi
ncopy=200 # number of file copies in the chain step ncopy=200 # number of file copies in the chain step
udf_fsize=20240 # number of sectors for UDF
_setup() _setup()
{ {
if mkdir -p $TEST_DIR/$$ if mkdir -p $testdir/$$
then then
: :
else else
echo "Error: cannot mkdir \"$TEST_DIR/$$\"" echo "Error: cannot mkdir \"$testdir/$$\""
exit 1 exit 1
fi fi
cd $TEST_DIR/$$ cd $testdir/$$
$verbose && echo -n "setup " $verbose && echo -n "setup "
sed -e '/^#/d' $tmp.config \ sed -e '/^#/d' $tmp.config \
@@ -202,12 +205,14 @@ _mark_iteration()
# #
_chain() _chain()
{ {
$AWK_PROG <$tmp.config ' $AWK_PROG -v full_file=$here/$seq.full -v verify=$verify <$tmp.config '
BEGIN { nfile = 0 } BEGIN { nfile = 0 }
/^\#/ { next } /^\#/ { next }
{ file[nfile] = $1 { file[nfile] = $1
size[nfile] = $2
link[nfile] = 0 link[nfile] = 0
nfile++ nfile++
total_size += $2
} }
END { srand('$iter') END { srand('$iter')
for (i=0; i < '$ncopy'; i++) { for (i=0; i < '$ncopy'; i++) {
@@ -216,28 +221,39 @@ END { srand('$iter')
while (j < 0 || j >= nfile) while (j < 0 || j >= nfile)
j = int(rand() * nfile) j = int(rand() * nfile)
if (link[j] == 0) { if (link[j] == 0) {
# previous should already exist and next one should not exist
printf "if [ ! -f %s ]; then echo \"%s missing!\"; exit; fi\n",file[j],file[j] printf "if [ ! -f %s ]; then echo \"%s missing!\"; exit; fi\n",file[j],file[j]
printf "if [ -f %s.0 ]; then echo \"%s.0 already present!\"; exit; fi\n",file[j],file[j] printf "if [ -f %s.0 ]; then echo \"%s.0 already present!\"; exit; fi\n",file[j],file[j]
printf "cp %s %s.0\n",file[j],file[j] printf "cp %s %s.0 || exit 1\n",file[j],file[j]
printf "ls -i %s.0\n", file[j] >full_file;
total_size += size[j]
printf "# total size = %d\n", total_size
} }
else { else {
# previous should already exist and next one should not exist
printf "if [ ! -f %s.%d ]; then echo \"%s.%d missing!\"; exit; fi\n",file[j],link[j]-1,file[j],link[j]-1 printf "if [ ! -f %s.%d ]; then echo \"%s.%d missing!\"; exit; fi\n",file[j],link[j]-1,file[j],link[j]-1
printf "if [ -f %s.%d ]; then echo \"%s.%d already present!\"; exit; fi\n",file[j],link[j],file[j],link[j] printf "if [ -f %s.%d ]; then echo \"%s.%d already present!\"; exit; fi\n",file[j],link[j],file[j],link[j]
printf "cp %s.%d %s.%d\n",file[j],link[j]-1,file[j],link[j] printf "cp %s.%d %s.%d || exit 1\n",file[j],link[j]-1,file[j],link[j]
printf "ls -i %s.%d\n", file[j], link[j] >full_file;
total_size += size[j]
printf "# total size = %d\n", total_size
} }
link[j]++ link[j]++
} }
# close all the chains, and remove all of the files except # close all the chains,
# the head of the chain # if have at least one copy then move the last copy to "file[j].last"
# and remove all of the other files except the head of the chain
for (j=0; j<nfile; j++) { for (j=0; j<nfile; j++) {
if (link[j] > 0) if (link[j] > 0) {
printf "mv %s.%d %s.last\n",file[j],link[j]-1,file[j] printf "mv %s.%d %s.last\n",file[j],link[j]-1,file[j]
printf "ls -i %s.last\n", file[j] >full_file;
}
for (i=0; i<link[j]-1; i++) { for (i=0; i<link[j]-1; i++) {
printf "rm -f %s.%d\n",file[j],i printf "rm -f %s.%d\n",file[j],i
} }
} }
}' \ }' \
| sh | tee -a $here/$seq.full | sh
} }
_check() _check()
@@ -247,6 +263,7 @@ _check()
sed -e '/^#/d' $tmp.config \ sed -e '/^#/d' $tmp.config \
| while read file nbytes | while read file nbytes
do do
# the file is never removed so it should exist
if [ ! -f $file ] if [ ! -f $file ]
then then
$verbose && echo $verbose && echo
@@ -254,6 +271,7 @@ _check()
touch $tmp.bad touch $tmp.bad
continue continue
fi fi
# checks that the file and its last copy are the same
if [ -f $file.last ] if [ -f $file.last ]
then then
if cmp $file $file.last >/dev/null 2>&1 if cmp $file $file.last >/dev/null 2>&1
@@ -283,16 +301,19 @@ _cleanup()
then then
$verbose && echo "cleanup" $verbose && echo "cleanup"
cd / cd /
rm -rf $TEST_DIR/$$ rm -rf $testdir/$$
_cleanup_testdir
done_cleanup=true done_cleanup=true
fi fi
} }
rm -f $here/$seq.full
status=0 status=0
_cleanup _cleanup
status=1 status=1
done_cleanup=false done_cleanup=false
_setup_testdir
_setup _setup
# do the test # do the test
@@ -300,6 +321,7 @@ _setup
for iter in 1 2 3 4 5 for iter in 1 2 3 4 5
do do
echo -n "iter $iter chain ... " echo -n "iter $iter chain ... "
echo "iter $iter" >> $here/$seq.full
_chain _chain
_check _check
if [ -f $tmp.bad ] if [ -f $tmp.bad ]
+20 -10
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# #
# XFS QA Test No. 002 # FS QA Test No. 002
# #
# simple inode link count test for a regular file # simple inode link count test for a regular file
# #
@@ -49,38 +49,48 @@ echo "QA output created by $seq"
tmp=/tmp/$$ tmp=/tmp/$$
here=`pwd` here=`pwd`
status=0 # success is the default! status=0 # success is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
rm -f $tmp.*
_cleanup_testdir
}
# real QA test starts here # real QA test starts here
_supported_fs xfs udf nfs
_supported_os IRIX Linux
_setup_testdir
echo "Silence is goodness ..." echo "Silence is goodness ..."
# ensure target directory exists # ensure target directory exists
mkdir `dirname $TEST_DIR/$tmp` 2>/dev/null mkdir `dirname $testdir/$tmp` 2>/dev/null
touch $TEST_DIR/$tmp.1 touch $testdir/$tmp.1
for l in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 for l in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do do
ln $TEST_DIR/$tmp.1 $TEST_DIR/$tmp.$l ln $testdir/$tmp.1 $testdir/$tmp.$l
x=`src/lstat64 $TEST_DIR/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'` x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
if [ "$l" -ne $x ] if [ "$l" -ne $x ]
then then
echo "Arrgh, created link #$l and lstat64 looks like ..." echo "Arrgh, created link #$l and lstat64 looks like ..."
src/lstat64 $TEST_DIR/$tmp.1 src/lstat64 $testdir/$tmp.1
status=1 status=1
fi fi
done done
for l in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 for l in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
do do
x=`src/lstat64 $TEST_DIR/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'` x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
if [ "$l" -ne $x ] if [ "$l" -ne $x ]
then then
echo "Arrgh, about to remove link #$l and lstat64 looks like ..." echo "Arrgh, about to remove link #$l and lstat64 looks like ..."
src/lstat64 $TEST_DIR/$tmp.1 src/lstat64 $testdir/$tmp.1
status=1 status=1
fi fi
rm -f $TEST_DIR/$tmp.$l rm -f $testdir/$tmp.$l
done done
# success, all done # success, all done
+3 -3
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# #
# XFS QA Test No. 003 # FS QA Test No. 003
# #
# exercise xfs_db bug #784078 # exercise xfs_db bug #784078
# #
@@ -54,8 +54,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
_need_to_be_root _need_to_be_root
# real QA test starts here # real QA test starts here
_supported_fs xfs
PATH=".:$PATH" _supported_os IRIX Linux
[ -f core ] && rm -f core [ -f core ] && rm -f core
[ -f core ] && echo "Warning: can't nuke existing core file!" [ -f core ] && echo "Warning: can't nuke existing core file!"
+10 -5
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 004 # FS QA Test No. 004
# #
# exercise xfs_db bug #789674 and other freesp functionality # exercise xfs_db bug #789674 and other freesp functionality
# #
@@ -57,7 +57,7 @@ _populate_scratch()
{ {
echo "=== mkfs output ===" >>$seq.full echo "=== mkfs output ===" >>$seq.full
_scratch_mkfs_xfs | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs _scratch_mkfs_xfs | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs
source $tmp.mkfs . $tmp.mkfs
_scratch_mount _scratch_mount
dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 & dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 & dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 &
@@ -72,17 +72,22 @@ _populate_scratch()
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
# real QA test starts here
_supported_fs xfs
_supported_os IRIX Linux
_need_to_be_root _need_to_be_root
_require_scratch _require_scratch
_require_nobigloopfs _require_nobigloopfs
# real QA test starts here
rm -f $seq.full rm -f $seq.full
_populate_scratch _populate_scratch
eval `df -P -T --block-size=512 $SCRATCH_MNT 2>&1 \ [ "$HOSTOS" = "Linux" ] && DF_PROG="$DF_PROG -P --block-size=512"
| $AWK_PROG 'END { printf "blocks=%u used=%u avail=%u\n", $3, $4, $5 }'`
eval `$DF_PROG $SCRATCH_MNT 2>&1 \
| tail -1 | $AWK_PROG '{ printf "blocks=%u used=%u avail=%u\n", $3, $4, $5 }'`
echo "df gave: blocks=$blocks used=$used avail=$avail" >>$seq.full echo "df gave: blocks=$blocks used=$used avail=$avail" >>$seq.full
echo "blocksize from mkfs is '$dbsize'" >>$seq.full echo "blocksize from mkfs is '$dbsize'" >>$seq.full
+16 -5
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 005 # FS QA Test No. 005
# #
# Test symlinks & ELOOP # Test symlinks & ELOOP
# #
@@ -39,7 +39,7 @@
owner=dxm@sgi.com owner=dxm@sgi.com
# #
# note ELOOP limit used to be 32 but changed to 8. Who know what # note ELOOP limit used to be 32 but changed to 8. Who knows what
# it might be next. # it might be next.
# #
@@ -53,8 +53,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
cd $TEST_DIR cd $testdir
rm -f symlink_{0,1,2,3}{0,1,2,3,4,5,6,7,8,9} symlink_self empty_file rm -f symlink_{0,1,2,3}{0,1,2,3,4,5,6,7,8,9} symlink_self empty_file
cd /
_cleanup_testdir
} }
_touch() _touch()
@@ -70,9 +72,16 @@ _touch()
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
# real QA test starts here # link correct .out file
_link_out_file $seq.out
cd $TEST_DIR # real QA test starts here
_supported_fs xfs udf nfs
_supported_os IRIX Linux
_setup_testdir
cd $testdir
o=empty_file o=empty_file
_touch $o _touch $o
@@ -92,4 +101,6 @@ echo "*** touch recusive symlinks"
echo "" echo ""
_touch symlink_self _touch symlink_self
exit exit
-42
View File
@@ -1,42 +0,0 @@
QA output created by 005
*** touch deep symlinks
touch: symlink_05: Too many levels of symbolic links
touch: symlink_06: Too many levels of symbolic links
touch: symlink_07: Too many levels of symbolic links
touch: symlink_08: Too many levels of symbolic links
touch: symlink_09: Too many levels of symbolic links
touch: symlink_10: Too many levels of symbolic links
touch: symlink_11: Too many levels of symbolic links
touch: symlink_12: Too many levels of symbolic links
touch: symlink_13: Too many levels of symbolic links
touch: symlink_14: Too many levels of symbolic links
touch: symlink_15: Too many levels of symbolic links
touch: symlink_16: Too many levels of symbolic links
touch: symlink_17: Too many levels of symbolic links
touch: symlink_18: Too many levels of symbolic links
touch: symlink_19: Too many levels of symbolic links
touch: symlink_20: Too many levels of symbolic links
touch: symlink_21: Too many levels of symbolic links
touch: symlink_22: Too many levels of symbolic links
touch: symlink_23: Too many levels of symbolic links
touch: symlink_24: Too many levels of symbolic links
touch: symlink_25: Too many levels of symbolic links
touch: symlink_26: Too many levels of symbolic links
touch: symlink_27: Too many levels of symbolic links
touch: symlink_28: Too many levels of symbolic links
touch: symlink_29: Too many levels of symbolic links
touch: symlink_30: Too many levels of symbolic links
touch: symlink_31: Too many levels of symbolic links
touch: symlink_32: Too many levels of symbolic links
touch: symlink_33: Too many levels of symbolic links
touch: symlink_34: Too many levels of symbolic links
touch: symlink_35: Too many levels of symbolic links
touch: symlink_36: Too many levels of symbolic links
touch: symlink_37: Too many levels of symbolic links
touch: symlink_38: Too many levels of symbolic links
touch: symlink_39: Too many levels of symbolic links
*** touch recusive symlinks
touch: symlink_self: Too many levels of symbolic links
+13 -7
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 006 # FS QA Test No. 006
# #
# permname # permname
# #
@@ -48,7 +48,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
rm -rf $TEST_DIR/permname.$$ cd /
rm -f $tmp.*
rm -rf $testdir/permname.$$
_cleanup_testdir
} }
_count() _count()
@@ -65,23 +68,26 @@ _count()
. ./common.filter . ./common.filter
# real QA test starts here # real QA test starts here
_supported_fs xfs udf nfs
_supported_os IRIX Linux
_setup_testdir
mkdir $TEST_DIR/permname.$$ mkdir $testdir/permname.$$
echo "" echo ""
echo "single thread permname" echo "single thread permname"
echo "----------------------" echo "----------------------"
mkdir $TEST_DIR/permname.$$/a mkdir $testdir/permname.$$/a
cd $TEST_DIR/permname.$$/a cd $testdir/permname.$$/a
$here/src/permname -c 4 -l 6 -p 1 || echo "permname returned $?" $here/src/permname -c 4 -l 6 -p 1 || echo "permname returned $?"
find . | _count find . | _count
echo "" echo ""
echo "multi thread permname" echo "multi thread permname"
echo "----------------------" echo "----------------------"
mkdir $TEST_DIR/permname.$$/b mkdir $testdir/permname.$$/b
cd $TEST_DIR/permname.$$/b cd $testdir/permname.$$/b
$here/src/permname -c 4 -l 6 -p 4 || echo "permname returned $?" $here/src/permname -c 4 -l 6 -p 4 || echo "permname returned $?"
find . | _count find . | _count
+11 -10
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 007 # FS QA Test No. 007
# #
# drive the src/nametest program # drive the src/nametest program
# which does a heap of open(create)/unlink/stat # which does a heap of open(create)/unlink/stat
@@ -51,8 +51,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
cd /
rm -f $tmp.* rm -f $tmp.*
rm -rf $TEST_DIR/$seq rm -rf $testdir/$seq
_cleanup_testdir
} }
# get standard environment, filters and checks # get standard environment, filters and checks
@@ -60,6 +62,11 @@ _cleanup()
. ./common.filter . ./common.filter
# real QA test starts here # real QA test starts here
_supported_fs xfs udf nfs
_supported_os IRIX Linux
_setup_testdir
status=1 # default failure status=1 # default failure
sourcefile=$tmp.nametest sourcefile=$tmp.nametest
seed=1 seed=1
@@ -74,16 +81,10 @@ while [ $i -le $num_filenames ]; do
i=`expr $i + 1` i=`expr $i + 1`
done done
mkdir $TEST_DIR/$seq mkdir $testdir/$seq
cd $TEST_DIR/$seq cd $testdir/$seq
$here/src/nametest -l $sourcefile -s $seed -i $iterations -z $here/src/nametest -l $sourcefile -s $seed -i $iterations -z
#optional stuff if your test has verbose output to help resolve problems
#echo
#echo "If failure, check $seq.full (this) and $seq.full.ok (reference)"
# success, all done # success, all done
status=0 status=0
exit exit
+10 -4
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 008 # FS QA Test No. 008
# #
# randholes test # randholes test
# #
@@ -45,11 +45,13 @@ here=`pwd`
tmp=/tmp/$$ tmp=/tmp/$$
status=0 # success is the default! status=0 # success is the default!
pgsize=`$here/src/feature -p` pgsize=`$here/src/feature -p`
trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15 trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
rm -rf $TEST_DIR/randholes.$$.* rm -f $tmp.*
rm -rf $testdir/randholes.$$.*
_cleanup_testdir
} }
_filter() _filter()
@@ -67,7 +69,7 @@ _do_test()
_holes="$2" _holes="$2"
_param="$3" _param="$3"
out=$TEST_DIR/randholes.$$.$_n out=$testdir/randholes.$$.$_n
echo "" echo ""
echo "randholes.$_n : $_param" | _filter echo "randholes.$_n : $_param" | _filter
echo "------------------------------------------" echo "------------------------------------------"
@@ -92,6 +94,10 @@ _do_test()
} }
# real QA test starts here # real QA test starts here
_supported_fs xfs
_supported_os IRIX Linux
_setup_testdir
rm -f $here/$seq.out.full rm -f $here/$seq.out.full
+3 -1
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 009 # FS QA Test No. 009
# #
# alloc test # alloc test
# #
@@ -90,6 +90,8 @@ _filesize()
. ./common.filter . ./common.filter
# real QA test starts here # real QA test starts here
_supported_fs xfs
_supported_os IRIX Linux
_require_scratch _require_scratch
+26 -5
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 010 # FS QA Test No. 010
# #
# dbtest # dbtest
# #
@@ -44,12 +44,15 @@ echo "QA output created by $seq"
here=`pwd` here=`pwd`
tmp=/tmp/$$ tmp=/tmp/$$
status=0 # success is the default! status=0 # success is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
rm -f $TEST_DIR/DBtest*.{pag,dir} cd /
rm -f $tmp.*
rm -f $testdir/DBtest*.{pag,dir}
_cleanup_testdir
} }
trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
# filter random number output from dbtest # filter random number output from dbtest
# #
@@ -64,11 +67,29 @@ _filter_dbtest()
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
# link correct .out file
_link_out_file $seq.out
# put operating system in $os
_get_os
[ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform" [ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform"
# real QA test starts here # real QA test starts here
cd $TEST_DIR _supported_fs xfs udf nfs
$here/src/dbtest -l 5 -n 3000 | _filter_dbtest _supported_os IRIX Linux
_setup_testdir
rm -f $seq.full
cd $testdir
if [ $os == 'irix' ]; then
$here/src/dbtest -l 5 -n 500 2>&1 | tee -a $here/$seq.full | _filter_dbtest
elif [ $os == 'linux' ]; then
$here/src/dbtest -l 5 -n 3000 2>&1 | tee -a $here/$seq.full | _filter_dbtest
fi
# success, all done # success, all done
exit exit
-58
View File
@@ -1,58 +0,0 @@
QA output created by 010
dbtest v1.0
Creating database containing 3000 records...
performing lookups for 5 iterations...
using BLEEP as seed for srandom()...
There were BLEEP duplicate checksums generated
Performing lookups on database...
Sequential lookups...
Random lookups...
Lookups succeeded...
Performing lookups on database...
Sequential lookups...
Random lookups...
Lookups succeeded...
Performing lookups on database...
Sequential lookups...
Random lookups...
Lookups succeeded...
Performing lookups on database...
Sequential lookups...
Random lookups...
Lookups succeeded...
Performing lookups on database...
Sequential lookups...
Random lookups...
Lookups succeeded...
Cleaning up database...
There were BLEEP duplicate checksums generated
+23 -18
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 011 # FS QA Test No. 011
# #
# dirstress # dirstress
# #
@@ -41,34 +41,33 @@ owner=dxm@sgi.com
seq=`basename $0` seq=`basename $0`
echo "QA output created by $seq" echo "QA output created by $seq"
# get standard environment, filters and checks out=""
. ./common.rc
. ./common.filter
here=`pwd` here=`pwd`
tmp=/tmp/$$ tmp=/tmp/$$
status=0 # success is the default! status=0 # success is the default!
out=$TEST_DIR/dirstress.$$ trap "_cleanup; exit \$status" 0 1 2 3 15
trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
rm -rf $out cd /
rm -f $tmp.*
[ -n "$out" ] && rm -rf $out
_cleanup_testdir
} }
# get standard environment, filters and checks # get standard environment, filters and checks
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
count=1000 # real QA test starts here
if ! mkdir $out _supported_fs xfs udf nfs
then _supported_os IRIX Linux
echo "!! couldn't mkdir $out"
status=1
exit
fi
rm -f $seq.out.full _setup_testdir
out=$testdir/dirstress.$$
rm -f $seq.full
_test() _test()
{ {
@@ -80,13 +79,19 @@ _test()
if ! $here/src/dirstress -d $out -f $count $args >$tmp.out 2>&1 if ! $here/src/dirstress -d $out -f $count $args >$tmp.out 2>&1
then then
echo " dirstress failed" echo " dirstress failed"
echo "*** TEST $test -d $out -f $count $args" >>$seq.out.full echo "*** TEST $test -d $out -f $count $args" >>$seq.full
cat $tmp.out >>$seq.out.full cat $tmp.out >>$seq.full
status=1 status=1
fi fi
} }
# dirstress doesn't check returns - this is a crash & burn test. # dirstress doesn't check returns - this is a crash & burn test.
if ! mkdir $out
then
echo "!! couldn't mkdir $out"
status=1
exit
fi
count=1000 count=1000
_test 1 "-p 1 -n 1" $count _test 1 "-p 1 -n 1" $count
+11 -4
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 012 # FS QA Test No. 012
# #
# holes # holes
# #
@@ -44,11 +44,14 @@ echo "QA output created by $seq"
here=`pwd` here=`pwd`
tmp=/tmp/$$ tmp=/tmp/$$
status=0 # success is the default! status=0 # success is the default!
trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15 trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
rm -rf $TEST_DIR/holes.$$.* cd /
rm -f $tmp.*
rm -rf $testdir/holes.$$.*
_cleanup_testdir
} }
_filesize() _filesize()
@@ -68,7 +71,7 @@ _do_test()
failed=0 failed=0
out=$TEST_DIR/holes.$$.$_n out=$testdir/holes.$$.$_n
echo "" echo ""
echo "holes.$_n : $_param" echo "holes.$_n : $_param"
echo "-----------------------------------------------" echo "-----------------------------------------------"
@@ -115,6 +118,10 @@ _do_test()
} }
# real QA test starts here # real QA test starts here
_supported_fs xfs
_supported_os IRIX Linux
_setup_testdir
rm -f $here/$seq.out.full rm -f $here/$seq.out.full
+20 -4
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 013 # FS QA Test No. 013
# #
# fsstress # fsstress
# #
@@ -48,10 +48,12 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
cd /
# we might get here with a RO FS # we might get here with a RO FS
mount -o remount,rw $TEST_DEV >/dev/null 2>&1 mount -o remount,rw $TEST_DEV >/dev/null 2>&1
# now kill! # now kill!
rm -rf $TEST_DIR/fsstress.$$.* rm -rf $testdir/fsstress.$$.*
_cleanup_testdir
} }
_filesize() _filesize()
@@ -63,13 +65,16 @@ _filesize()
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
# put operating system in $os
_get_os
_do_test() _do_test()
{ {
_n="$1" _n="$1"
_param="$2" _param="$2"
_count="$3" _count="$3"
out=$TEST_DIR/fsstress.$$.$_n out=$testdir/fsstress.$$.$_n
rm -rf $out rm -rf $out
if ! mkdir $out if ! mkdir $out
then then
@@ -101,11 +106,22 @@ _do_test()
# real QA test starts here # real QA test starts here
_supported_fs xfs udf
_supported_os IRIX Linux
_setup_testdir
rm -f $here/$seq.full rm -f $here/$seq.full
echo "brevity is wit..." echo "brevity is wit..."
count=2000 if [ $os == 'irix' ]; then
count=1024
elif [ $os == 'linux' ]; then
count=2000
else
echo Error test $seq does not run on the operating system: `uname`
exit
fi
procs=20 procs=20
_check_test_fs _check_test_fs
+12 -5
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 014 # FS QA Test No. 014
# #
# truncfile # truncfile
# #
@@ -44,24 +44,31 @@ echo "QA output created by $seq"
here=`pwd` here=`pwd`
tmp=/tmp/$$ tmp=/tmp/$$
status=0 # success is the default! status=0 # success is the default!
trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15 trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
rm -rf $TEST_DIR/truncfile.$$.* cd /
rm -f $tmp.*
rm -rf $testdir/truncfile.$$.*
_cleanup_testdir
} }
# get standard environment, filters and checks # get standard environment, filters and checks
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
_supported_fs xfs udf nfs
_supported_os IRIX Linux
echo "berevity is wit..." _setup_testdir
echo "brevity is wit..."
echo "------" echo "------"
echo "test 1" echo "test 1"
echo "------" echo "------"
if ! src/truncfile -c 10000 $TEST_DIR/truncfile.$$.0 >$tmp.out 2>&1 if ! src/truncfile -c 10000 $testdir/truncfile.$$.0 >$tmp.out 2>&1
then then
out=`cat $tmp.out` out=`cat $tmp.out`
echo "truncfile returned $? : \"$out\"" echo "truncfile returned $? : \"$out\""
+1 -1
View File
@@ -1,5 +1,5 @@
QA output created by 014 QA output created by 014
berevity is wit... brevity is wit...
------ ------
test 1 test 1
------ ------
+4 -1
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 015 # FS QA Test No. 015
# #
# check out-of-space behaviour # check out-of-space behaviour
# #
@@ -73,6 +73,9 @@ _filter_dd()
} }
# real QA test starts here # real QA test starts here
_supported_fs xfs
_supported_os IRIX Linux
_require_scratch _require_scratch
_require_nobigloopfs _require_nobigloopfs
+6 -3
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 016 # FS QA Test No. 016
# #
# test end of log overwrite bug #796141 # test end of log overwrite bug #796141
# #
@@ -62,6 +62,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
cd /
rm -f $tmp.* rm -f $tmp.*
echo "*** unmount" echo "*** unmount"
umount $SCRATCH_MNT 2>/dev/null umount $SCRATCH_MNT 2>/dev/null
@@ -83,7 +84,7 @@ _init()
[ $? -ne 0 ] && \ [ $? -ne 0 ] && \
_notrun "Cannot mkfs for this test using MKFS_OPTIONS specified" _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
source $tmp.mkfs . $tmp.mkfs
} }
_log_traffic() _log_traffic()
@@ -164,7 +165,7 @@ _check_corrupt()
f="c6c6c6c6" f="c6c6c6c6"
echo "*** check for corruption" echo "*** check for corruption"
echo "expect $f..." >>$seq.full echo "expect $f..." >>$seq.full
xfs_db -r $1 -c "fsblock $2" -c "print" | head | tee -a $seq.full | \ xfs_db -r -c "fsblock $2" -c "print" $1 | head | tee -a $seq.full | \
grep -q -v "$f $f $f $f $f $f $f $f" && \ grep -q -v "$f $f $f $f $f $f $f $f" && \
_fail "!!! block $2 corrupted!" _fail "!!! block $2 corrupted!"
} }
@@ -174,6 +175,8 @@ _check_corrupt()
. ./common.filter . ./common.filter
# real QA test starts here # real QA test starts here
_supported_fs xfs
_supported_os Linux
rm -f $seq.full rm -f $seq.full
+4 -2
View File
@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# XFS QA Test No. 017 # FS QA Test No. 017
# #
# test remount ro - pv 795642 # test remount ro - pv 795642
# #
@@ -44,19 +44,21 @@ echo "QA output created by $seq"
here=`pwd` here=`pwd`
tmp=/tmp/$$ tmp=/tmp/$$
status=1 status=1
trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
_cleanup() _cleanup()
{ {
echo "*** unmount" echo "*** unmount"
umount $SCRATCH_MNT 2>/dev/null umount $SCRATCH_MNT 2>/dev/null
} }
trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks # get standard environment, filters and checks
. ./common.rc . ./common.rc
. ./common.filter . ./common.filter
# real QA test starts here # real QA test starts here
_supported_fs xfs
_supported_os Linux
_require_scratch _require_scratch

Some files were not shown because too many files have changed in this diff Show More