mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Fixed merge problems
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# XFS QA Test No. 001
|
||||
# FS QA Test No. 001
|
||||
#
|
||||
# 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
|
||||
# checks for data corruption.
|
||||
@@ -62,8 +61,11 @@ done_cleanup=false
|
||||
trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs udf nfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
verbose=true
|
||||
verify=$here/verify_fill
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
@@ -127,17 +129,18 @@ else
|
||||
fi
|
||||
|
||||
ncopy=200 # number of file copies in the chain step
|
||||
udf_fsize=20240 # number of sectors for UDF
|
||||
|
||||
_setup()
|
||||
{
|
||||
if mkdir -p $TEST_DIR/$$
|
||||
if mkdir -p $testdir/$$
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "Error: cannot mkdir \"$TEST_DIR/$$\""
|
||||
echo "Error: cannot mkdir \"$testdir/$$\""
|
||||
exit 1
|
||||
fi
|
||||
cd $TEST_DIR/$$
|
||||
cd $testdir/$$
|
||||
|
||||
$verbose && echo -n "setup "
|
||||
sed -e '/^#/d' $tmp.config \
|
||||
@@ -202,12 +205,14 @@ _mark_iteration()
|
||||
#
|
||||
_chain()
|
||||
{
|
||||
$AWK_PROG <$tmp.config '
|
||||
$AWK_PROG -v full_file=$here/$seq.full -v verify=$verify <$tmp.config '
|
||||
BEGIN { nfile = 0 }
|
||||
/^\#/ { next }
|
||||
{ file[nfile] = $1
|
||||
size[nfile] = $2
|
||||
link[nfile] = 0
|
||||
nfile++
|
||||
total_size += $2
|
||||
}
|
||||
END { srand('$iter')
|
||||
for (i=0; i < '$ncopy'; i++) {
|
||||
@@ -216,28 +221,39 @@ END { srand('$iter')
|
||||
while (j < 0 || j >= nfile)
|
||||
j = int(rand() * nfile)
|
||||
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.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 {
|
||||
# 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 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]++
|
||||
}
|
||||
# close all the chains, and remove all of the files except
|
||||
# the head of the chain
|
||||
# close all the chains,
|
||||
# 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++) {
|
||||
if (link[j] > 0)
|
||||
if (link[j] > 0) {
|
||||
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++) {
|
||||
printf "rm -f %s.%d\n",file[j],i
|
||||
}
|
||||
}
|
||||
}' \
|
||||
| sh
|
||||
| tee -a $here/$seq.full | sh
|
||||
}
|
||||
|
||||
_check()
|
||||
@@ -247,6 +263,7 @@ _check()
|
||||
sed -e '/^#/d' $tmp.config \
|
||||
| while read file nbytes
|
||||
do
|
||||
# the file is never removed so it should exist
|
||||
if [ ! -f $file ]
|
||||
then
|
||||
$verbose && echo
|
||||
@@ -254,6 +271,7 @@ _check()
|
||||
touch $tmp.bad
|
||||
continue
|
||||
fi
|
||||
# checks that the file and its last copy are the same
|
||||
if [ -f $file.last ]
|
||||
then
|
||||
if cmp $file $file.last >/dev/null 2>&1
|
||||
@@ -283,16 +301,19 @@ _cleanup()
|
||||
then
|
||||
$verbose && echo "cleanup"
|
||||
cd /
|
||||
rm -rf $TEST_DIR/$$
|
||||
rm -rf $testdir/$$
|
||||
_cleanup_testdir
|
||||
done_cleanup=true
|
||||
fi
|
||||
}
|
||||
|
||||
rm -f $here/$seq.full
|
||||
status=0
|
||||
_cleanup
|
||||
status=1
|
||||
done_cleanup=false
|
||||
|
||||
_setup_testdir
|
||||
_setup
|
||||
|
||||
# do the test
|
||||
@@ -300,6 +321,7 @@ _setup
|
||||
for iter in 1 2 3 4 5
|
||||
do
|
||||
echo -n "iter $iter chain ... "
|
||||
echo "iter $iter" >> $here/$seq.full
|
||||
_chain
|
||||
_check
|
||||
if [ -f $tmp.bad ]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# XFS QA Test No. 002
|
||||
# FS QA Test No. 002
|
||||
#
|
||||
# simple inode link count test for a regular file
|
||||
#
|
||||
@@ -49,38 +49,48 @@ echo "QA output created by $seq"
|
||||
tmp=/tmp/$$
|
||||
here=`pwd`
|
||||
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
|
||||
_supported_fs xfs udf nfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_setup_testdir
|
||||
|
||||
echo "Silence is goodness ..."
|
||||
|
||||
# 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
|
||||
do
|
||||
ln $TEST_DIR/$tmp.1 $TEST_DIR/$tmp.$l
|
||||
x=`src/lstat64 $TEST_DIR/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
|
||||
ln $testdir/$tmp.1 $testdir/$tmp.$l
|
||||
x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
|
||||
if [ "$l" -ne $x ]
|
||||
then
|
||||
echo "Arrgh, created link #$l and lstat64 looks like ..."
|
||||
src/lstat64 $TEST_DIR/$tmp.1
|
||||
src/lstat64 $testdir/$tmp.1
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
|
||||
for l in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
|
||||
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 ]
|
||||
then
|
||||
echo "Arrgh, about to remove link #$l and lstat64 looks like ..."
|
||||
src/lstat64 $TEST_DIR/$tmp.1
|
||||
src/lstat64 $testdir/$tmp.1
|
||||
status=1
|
||||
fi
|
||||
rm -f $TEST_DIR/$tmp.$l
|
||||
rm -f $testdir/$tmp.$l
|
||||
done
|
||||
|
||||
# success, all done
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# XFS QA Test No. 003
|
||||
# FS QA Test No. 003
|
||||
#
|
||||
# exercise xfs_db bug #784078
|
||||
#
|
||||
@@ -54,8 +54,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
_need_to_be_root
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
PATH=".:$PATH"
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
[ -f core ] && rm -f core
|
||||
[ -f core ] && echo "Warning: can't nuke existing core file!"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 004
|
||||
# FS QA Test No. 004
|
||||
#
|
||||
# exercise xfs_db bug #789674 and other freesp functionality
|
||||
#
|
||||
@@ -57,7 +57,7 @@ _populate_scratch()
|
||||
{
|
||||
echo "=== mkfs output ===" >>$seq.full
|
||||
_scratch_mkfs_xfs | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs
|
||||
source $tmp.mkfs
|
||||
. $tmp.mkfs
|
||||
_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/goo count=400 bs=4096 >/dev/null 2>&1 &
|
||||
@@ -72,17 +72,22 @@ _populate_scratch()
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_need_to_be_root
|
||||
_require_scratch
|
||||
_require_nobigloopfs
|
||||
|
||||
# real QA test starts here
|
||||
rm -f $seq.full
|
||||
|
||||
_populate_scratch
|
||||
|
||||
eval `df -P -T --block-size=512 $SCRATCH_MNT 2>&1 \
|
||||
| $AWK_PROG 'END { printf "blocks=%u used=%u avail=%u\n", $3, $4, $5 }'`
|
||||
[ "$HOSTOS" = "Linux" ] && DF_PROG="$DF_PROG -P --block-size=512"
|
||||
|
||||
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 "blocksize from mkfs is '$dbsize'" >>$seq.full
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 005
|
||||
# FS QA Test No. 005
|
||||
#
|
||||
# Test symlinks & ELOOP
|
||||
#
|
||||
@@ -39,7 +39,7 @@
|
||||
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.
|
||||
#
|
||||
|
||||
@@ -53,8 +53,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_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
|
||||
cd /
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
_touch()
|
||||
@@ -70,9 +72,16 @@ _touch()
|
||||
. ./common.rc
|
||||
. ./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
|
||||
_touch $o
|
||||
@@ -92,4 +101,6 @@ echo "*** touch recusive symlinks"
|
||||
echo ""
|
||||
_touch symlink_self
|
||||
|
||||
|
||||
|
||||
exit
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 006
|
||||
# FS QA Test No. 006
|
||||
#
|
||||
# permname
|
||||
#
|
||||
@@ -48,7 +48,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
rm -rf $TEST_DIR/permname.$$
|
||||
cd /
|
||||
rm -f $tmp.*
|
||||
rm -rf $testdir/permname.$$
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
_count()
|
||||
@@ -65,23 +68,26 @@ _count()
|
||||
. ./common.filter
|
||||
|
||||
# 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 "single thread permname"
|
||||
echo "----------------------"
|
||||
mkdir $TEST_DIR/permname.$$/a
|
||||
cd $TEST_DIR/permname.$$/a
|
||||
mkdir $testdir/permname.$$/a
|
||||
cd $testdir/permname.$$/a
|
||||
$here/src/permname -c 4 -l 6 -p 1 || echo "permname returned $?"
|
||||
find . | _count
|
||||
|
||||
echo ""
|
||||
echo "multi thread permname"
|
||||
echo "----------------------"
|
||||
mkdir $TEST_DIR/permname.$$/b
|
||||
cd $TEST_DIR/permname.$$/b
|
||||
mkdir $testdir/permname.$$/b
|
||||
cd $testdir/permname.$$/b
|
||||
$here/src/permname -c 4 -l 6 -p 4 || echo "permname returned $?"
|
||||
find . | _count
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 007
|
||||
# FS QA Test No. 007
|
||||
#
|
||||
# drive the src/nametest program
|
||||
# which does a heap of open(create)/unlink/stat
|
||||
@@ -51,8 +51,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
cd /
|
||||
rm -f $tmp.*
|
||||
rm -rf $TEST_DIR/$seq
|
||||
rm -rf $testdir/$seq
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
@@ -60,6 +62,11 @@ _cleanup()
|
||||
. ./common.filter
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs udf nfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_setup_testdir
|
||||
|
||||
status=1 # default failure
|
||||
sourcefile=$tmp.nametest
|
||||
seed=1
|
||||
@@ -74,16 +81,10 @@ while [ $i -le $num_filenames ]; do
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
||||
mkdir $TEST_DIR/$seq
|
||||
cd $TEST_DIR/$seq
|
||||
mkdir $testdir/$seq
|
||||
cd $testdir/$seq
|
||||
$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
|
||||
status=0
|
||||
exit
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 008
|
||||
# FS QA Test No. 008
|
||||
#
|
||||
# randholes test
|
||||
#
|
||||
@@ -45,11 +45,13 @@ here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=0 # success is the default!
|
||||
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()
|
||||
{
|
||||
rm -rf $TEST_DIR/randholes.$$.*
|
||||
rm -f $tmp.*
|
||||
rm -rf $testdir/randholes.$$.*
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
_filter()
|
||||
@@ -67,7 +69,7 @@ _do_test()
|
||||
_holes="$2"
|
||||
_param="$3"
|
||||
|
||||
out=$TEST_DIR/randholes.$$.$_n
|
||||
out=$testdir/randholes.$$.$_n
|
||||
echo ""
|
||||
echo "randholes.$_n : $_param" | _filter
|
||||
echo "------------------------------------------"
|
||||
@@ -92,6 +94,10 @@ _do_test()
|
||||
}
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_setup_testdir
|
||||
|
||||
rm -f $here/$seq.out.full
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 009
|
||||
# FS QA Test No. 009
|
||||
#
|
||||
# alloc test
|
||||
#
|
||||
@@ -90,6 +90,8 @@ _filesize()
|
||||
. ./common.filter
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_scratch
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 010
|
||||
# FS QA Test No. 010
|
||||
#
|
||||
# dbtest
|
||||
#
|
||||
@@ -44,12 +44,15 @@ echo "QA output created by $seq"
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=0 # success is the default!
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_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
|
||||
#
|
||||
@@ -64,11 +67,29 @@ _filter_dbtest()
|
||||
. ./common.rc
|
||||
. ./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"
|
||||
|
||||
# real QA test starts here
|
||||
cd $TEST_DIR
|
||||
$here/src/dbtest -l 5 -n 3000 | _filter_dbtest
|
||||
_supported_fs xfs udf nfs
|
||||
_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
|
||||
exit
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 011
|
||||
# FS QA Test No. 011
|
||||
#
|
||||
# dirstress
|
||||
#
|
||||
@@ -41,34 +41,33 @@ owner=dxm@sgi.com
|
||||
seq=`basename $0`
|
||||
echo "QA output created by $seq"
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
out=""
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=0 # success is the default!
|
||||
out=$TEST_DIR/dirstress.$$
|
||||
trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
rm -rf $out
|
||||
cd /
|
||||
rm -f $tmp.*
|
||||
[ -n "$out" ] && rm -rf $out
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
count=1000
|
||||
if ! mkdir $out
|
||||
then
|
||||
echo "!! couldn't mkdir $out"
|
||||
status=1
|
||||
exit
|
||||
fi
|
||||
# real QA test starts here
|
||||
_supported_fs xfs udf nfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
rm -f $seq.out.full
|
||||
_setup_testdir
|
||||
|
||||
out=$testdir/dirstress.$$
|
||||
|
||||
rm -f $seq.full
|
||||
|
||||
_test()
|
||||
{
|
||||
@@ -80,13 +79,19 @@ _test()
|
||||
if ! $here/src/dirstress -d $out -f $count $args >$tmp.out 2>&1
|
||||
then
|
||||
echo " dirstress failed"
|
||||
echo "*** TEST $test -d $out -f $count $args" >>$seq.out.full
|
||||
cat $tmp.out >>$seq.out.full
|
||||
echo "*** TEST $test -d $out -f $count $args" >>$seq.full
|
||||
cat $tmp.out >>$seq.full
|
||||
status=1
|
||||
fi
|
||||
}
|
||||
|
||||
# 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
|
||||
_test 1 "-p 1 -n 1" $count
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 012
|
||||
# FS QA Test No. 012
|
||||
#
|
||||
# holes
|
||||
#
|
||||
@@ -44,11 +44,14 @@ echo "QA output created by $seq"
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
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()
|
||||
{
|
||||
rm -rf $TEST_DIR/holes.$$.*
|
||||
cd /
|
||||
rm -f $tmp.*
|
||||
rm -rf $testdir/holes.$$.*
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
_filesize()
|
||||
@@ -68,7 +71,7 @@ _do_test()
|
||||
|
||||
failed=0
|
||||
|
||||
out=$TEST_DIR/holes.$$.$_n
|
||||
out=$testdir/holes.$$.$_n
|
||||
echo ""
|
||||
echo "holes.$_n : $_param"
|
||||
echo "-----------------------------------------------"
|
||||
@@ -115,6 +118,10 @@ _do_test()
|
||||
}
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_setup_testdir
|
||||
|
||||
rm -f $here/$seq.out.full
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 013
|
||||
# FS QA Test No. 013
|
||||
#
|
||||
# fsstress
|
||||
#
|
||||
@@ -48,10 +48,12 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
cd /
|
||||
# we might get here with a RO FS
|
||||
mount -o remount,rw $TEST_DEV >/dev/null 2>&1
|
||||
# now kill!
|
||||
rm -rf $TEST_DIR/fsstress.$$.*
|
||||
rm -rf $testdir/fsstress.$$.*
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
_filesize()
|
||||
@@ -63,13 +65,16 @@ _filesize()
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
# put operating system in $os
|
||||
_get_os
|
||||
|
||||
_do_test()
|
||||
{
|
||||
_n="$1"
|
||||
_param="$2"
|
||||
_count="$3"
|
||||
|
||||
out=$TEST_DIR/fsstress.$$.$_n
|
||||
out=$testdir/fsstress.$$.$_n
|
||||
rm -rf $out
|
||||
if ! mkdir $out
|
||||
then
|
||||
@@ -101,11 +106,22 @@ _do_test()
|
||||
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs udf
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_setup_testdir
|
||||
|
||||
rm -f $here/$seq.full
|
||||
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
|
||||
|
||||
_check_test_fs
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 014
|
||||
# FS QA Test No. 014
|
||||
#
|
||||
# truncfile
|
||||
#
|
||||
@@ -44,24 +44,31 @@ echo "QA output created by $seq"
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
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()
|
||||
{
|
||||
rm -rf $TEST_DIR/truncfile.$$.*
|
||||
cd /
|
||||
rm -f $tmp.*
|
||||
rm -rf $testdir/truncfile.$$.*
|
||||
_cleanup_testdir
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
_supported_fs xfs udf nfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
echo "berevity is wit..."
|
||||
_setup_testdir
|
||||
|
||||
echo "brevity is wit..."
|
||||
|
||||
echo "------"
|
||||
echo "test 1"
|
||||
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
|
||||
out=`cat $tmp.out`
|
||||
echo "truncfile returned $? : \"$out\""
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
QA output created by 014
|
||||
berevity is wit...
|
||||
brevity is wit...
|
||||
------
|
||||
test 1
|
||||
------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 015
|
||||
# FS QA Test No. 015
|
||||
#
|
||||
# check out-of-space behaviour
|
||||
#
|
||||
@@ -73,6 +73,9 @@ _filter_dd()
|
||||
}
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_scratch
|
||||
_require_nobigloopfs
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 016
|
||||
# FS QA Test No. 016
|
||||
#
|
||||
# test end of log overwrite bug #796141
|
||||
#
|
||||
@@ -62,6 +62,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
cd /
|
||||
rm -f $tmp.*
|
||||
echo "*** unmount"
|
||||
umount $SCRATCH_MNT 2>/dev/null
|
||||
@@ -83,7 +84,7 @@ _init()
|
||||
[ $? -ne 0 ] && \
|
||||
_notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
|
||||
_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
|
||||
source $tmp.mkfs
|
||||
. $tmp.mkfs
|
||||
}
|
||||
|
||||
_log_traffic()
|
||||
@@ -164,7 +165,7 @@ _check_corrupt()
|
||||
f="c6c6c6c6"
|
||||
echo "*** check for corruption"
|
||||
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" && \
|
||||
_fail "!!! block $2 corrupted!"
|
||||
}
|
||||
@@ -174,6 +175,8 @@ _check_corrupt()
|
||||
. ./common.filter
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
|
||||
rm -f $seq.full
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 017
|
||||
# FS QA Test No. 017
|
||||
#
|
||||
# test remount ro - pv 795642
|
||||
#
|
||||
@@ -44,19 +44,21 @@ echo "QA output created by $seq"
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1
|
||||
trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
echo "*** unmount"
|
||||
umount $SCRATCH_MNT 2>/dev/null
|
||||
}
|
||||
trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
|
||||
_require_scratch
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user