xfstests: convert tests to use new results directory

Essentially the change is simply this. Converting:

... >> $seq.????

to:

.... >> $RESULT_DIR/$seq.????

so that output files are directed to the defined output directory.

sed to the rescue:

$ sed -i -e '/^seq=.*$/a seqres=$RESULT_DIR/$seq' -e 's/seq.full/seqres.full/' tests/*/*

will do most of the work automatically.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
[rjohnston@sgi.com reworked for TOT changes]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Dave Chinner
2013-03-15 12:28:02 +00:00
committed by Rich Johnston
parent 1686f9abfc
commit 1d5d46db80
308 changed files with 1641 additions and 717 deletions
+7 -4
View File
@@ -32,6 +32,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
# get standard environment, filters and checks
@@ -189,7 +192,7 @@ _mark_iteration()
#
_chain()
{
$AWK_PROG -v full_file=$here/$seq.full -v verify=$verify <$tmp.config '
$AWK_PROG -v full_file=$here/$seqres.full -v verify=$verify <$tmp.config '
BEGIN { nfile = 0 }
/^\#/ { next }
{ file[nfile] = $1
@@ -237,7 +240,7 @@ END { srand('$iter')
}
}
}' \
| tee -a $here/$seq.full | sh
| tee -a $here/$seqres.full | sh
}
_check()
@@ -291,7 +294,7 @@ _cleanup()
fi
}
rm -f $here/$seq.full
rm -f $here/$seqres.full
status=0
_cleanup
status=1
@@ -305,7 +308,7 @@ _setup
for iter in 1 2 3 4 5
do
echo -n "iter $iter chain ... "
echo "iter $iter" >> $here/$seq.full
echo "iter $iter" >> $here/$seqres.full
_chain
_check
if [ -f $tmp.bad ]
+3
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
# get standard environment, filters and checks
+3
View File
@@ -33,6 +33,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
+3
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
+3
View File
@@ -26,6 +26,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
+5 -2
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -59,11 +62,11 @@ _supported_os IRIX Linux
_setup_testdir
rm -f $seq.full
rm -f $seqres.full
cd $testdir
$here/src/dbtest -l 5 -n 1000 2>&1 | tee -a $here/$seq.full | _filter_dbtest
$here/src/dbtest -l 5 -n 1000 2>&1 | tee -a $here/$seqres.full | _filter_dbtest
# success, all done
exit
+6 -3
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
out=""
@@ -51,7 +54,7 @@ _setup_testdir
out=$testdir/dirstress.$$
rm -f $seq.full
rm -f $seqres.full
_test()
{
@@ -63,8 +66,8 @@ _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.full
cat $tmp.out >>$seq.full
echo "*** TEST $test -d $out -f $count $args" >>$seqres.full
cat $tmp.out >>$seqres.full
status=1
fi
}
+13 -10
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -73,15 +76,15 @@ _do_test()
echo "fsstress.$_n : $_param"
echo "-----------------------------------------------"
# -m limits number of users/groups so check doesn't fail (malloc) later
dbgoutfile=$seq.full
dbgoutfile=$seqres.full
if ! $FSSTRESS_PROG $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
then
echo " fsstress (count=$_count) returned $? - see $seq.full"
echo "--------------------------------------" >>$here/$seq.full
echo "$_n - output from fsstress:" >>$here/$seq.full
echo "--------------------------------------" >>$here/$seq.full
echo "<NOT LOGGED>" >>$here/$seq.full
#cat $tmp.out >>$here/$seq.full
echo " fsstress (count=$_count) returned $? - see $seqres.full"
echo "--------------------------------------" >>$here/$seqres.full
echo "$_n - output from fsstress:" >>$here/$seqres.full
echo "--------------------------------------" >>$here/$seqres.full
echo "<NOT LOGGED>" >>$here/$seqres.full
#cat $tmp.out >>$here/$seqres.full
status=1
fi
@@ -95,7 +98,7 @@ _supported_os IRIX Linux
_setup_testdir
rm -f $here/$seq.full
rm -f $here/$seqres.full
echo "brevity is wit..."
count=1000
@@ -115,8 +118,8 @@ _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
# if all ok by here then probably don't need $seqres.full
rm -f $seqres.full
exit
+3
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
+7 -4
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -56,7 +59,7 @@ _scratch_mkfs_sized `expr 50 \* 1024 \* 1024` >/dev/null 2>&1 \
|| _fail "mkfs failed"
_scratch_mount || _fail "mount failed"
out=$SCRATCH_MNT/fillup.$$
rm -f $seq.full
rm -f $seqres.full
free0=`_free`
if [ -z "$free0" ]
@@ -64,7 +67,7 @@ then
echo " *** failed to get free space (0)"
exit 1
fi
echo "free space at start $free0" >> $seq.full
echo "free space at start $free0" >> $seqres.full
echo "fill disk:" # well, filesystem really - not disk
@@ -78,7 +81,7 @@ then
echo " *** failed to get free space (1)"
exit 1
fi
echo "free space after fill $free1" >> $seq.full
echo "free space after fill $free1" >> $seqres.full
if [ ! -e $out ]
then
@@ -116,7 +119,7 @@ then
echo " *** failed to get free space (2)"
exit 1
fi
echo "free space after delete $free2" >> $seq.full
echo "free space after delete $free2" >> $seqres.full
echo -n " !!! "
_within_tolerance "free space" $free2 $free0 1% -v
+7 -4
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -85,7 +88,7 @@ _require_attrs
_setup_testdir
rm -f $seq.full
rm -f $seqres.full
testfile=$testdir/attribute_$$
@@ -120,7 +123,7 @@ v=0
while [ $v -lt $MAX_ATTRS ]
do
echo -n "value_$v" | attr -s "attribute_$v" $testfile >>$seq.full
echo -n "value_$v" | attr -s "attribute_$v" $testfile >>$seqres.full
if [ $? -ne 0 ]
then
echo "!!! failed to add \"attribute_$v\""
@@ -133,7 +136,7 @@ done
echo "*** check"
# don't print it all out...
getfattr --absolute-names $testfile \
| tee -a $seq.full \
| tee -a $seqres.full \
| $AWK_PROG '
/^#/ { next }
/^[ ]*$/ { next }
@@ -145,7 +148,7 @@ echo "*** remove lots of attributes"
v=0
while [ $v -lt $MAX_ATTRS ]
do
if ! $ATTR_PROG -r "attribute_$v" $testfile >>$seq.full
if ! $ATTR_PROG -r "attribute_$v" $testfile >>$seqres.full
then
echo "!!! failed to remove \"attribute_$v\""
exit 1
+3
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
+10 -7
View File
@@ -24,6 +24,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -75,7 +78,7 @@ _supported_os Linux
_require_scratch
_require_attrs
rm -f $tmp.backup1 $tmp.backup2 $seq.full
rm -f $tmp.backup1 $tmp.backup2 $seqres.full
# real QA test starts here
_scratch_mkfs > /dev/null 2>&1 || _fail "mkfs failed"
@@ -181,8 +184,8 @@ _backup()
{
# NB: no filtering of scratch here... (need to restore too)
$GETFATTR_PROG --absolute-names -dh -R -m '.' $SCRATCH_MNT >$1
echo BACKUP $1 >>$seq.full
cat $1 >> $seq.full
echo BACKUP $1 >>$seqres.full
cat $1 >> $seqres.full
[ ! -s $1 ] && echo "warning: $1 (backup file) is empty"
}
@@ -191,8 +194,8 @@ _backup $tmp.backup1
echo "*** clear out the scratch device"
rm -fr $SCRATCH_MNT/*
echo "AFTER REMOVE" >>$seq.full
getfattr -L -R -m '.' $SCRATCH_MNT >>$seq.full
echo "AFTER REMOVE" >>$seqres.full
getfattr -L -R -m '.' $SCRATCH_MNT >>$seqres.full
echo "*** reset test bed with no extended attributes"
_create_test_bed
@@ -202,8 +205,8 @@ echo "*** restore everything"
setfattr -h --restore=$tmp.backup1
_backup $tmp.backup2
echo "AFTER RESTORE" >>$seq.full
getfattr -L -R -m '.' $SCRATCH_MNT >>$seq.full
echo "AFTER RESTORE" >>$seqres.full
getfattr -L -R -m '.' $SCRATCH_MNT >>$seqres.full
echo "*** compare before and after backups"
diff $tmp.backup1 $tmp.backup2
+17 -14
View File
@@ -24,6 +24,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -57,13 +60,13 @@ _require_freeze
echo "*** init FS"
rm -f $seq.full
rm -f $seqres.full
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** MKFS ***" >>$seq.full
echo "" >>$seq.full
_scratch_mkfs >>$seq.full 2>&1 \
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
_scratch_mkfs >>$seqres.full 2>&1 \
|| _fail "mkfs failed"
_scratch_mount >>$seq.full 2>&1 \
_scratch_mount >>$seqres.full 2>&1 \
|| _fail "mount failed"
touch $tmp.running
@@ -106,23 +109,23 @@ touch $tmp.running
i=0
let ITERATIONS=$ITERATIONS-1
echo | tee -a $seq.full
echo | tee -a $seqres.full
while [ $i -le $ITERATIONS ]
do
echo "*** iteration: $i" | tee -a $seq.full
echo "*** freezing \$SCRATCH_MNT" | tee -a $seq.full
xfs_freeze -f "$SCRATCH_MNT" | tee -a $seq.full
echo "*** iteration: $i" | tee -a $seqres.full
echo "*** freezing \$SCRATCH_MNT" | tee -a $seqres.full
xfs_freeze -f "$SCRATCH_MNT" | tee -a $seqres.full
[ $? != 0 ] && echo xfs_freeze -f "$SCRATCH_MNT" failed | \
tee -a $seq.full
tee -a $seqres.full
sleep 2
echo "*** thawing \$SCRATCH_MNT" | tee -a $seq.full
xfs_freeze -u "$SCRATCH_MNT" | tee -a $seq.full
echo "*** thawing \$SCRATCH_MNT" | tee -a $seqres.full
xfs_freeze -u "$SCRATCH_MNT" | tee -a $seqres.full
[ $? != 0 ] && echo xfs_freeze -u "$SCRATCH_MNT" failed | \
tee -a $seq.full
tee -a $seqres.full
sleep 2
echo | tee -a $seq.full
echo | tee -a $seqres.full
let i=$i+1
done
+9 -6
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -39,7 +42,7 @@ _supported_fs generic
_supported_os IRIX Linux
_require_scratch
rm -f $seq.full
rm -f $seqres.full
umount $SCRATCH_DEV >/dev/null 2>&1
@@ -60,19 +63,19 @@ done
cd $here
wait
ls -lh $SCRATCH_MNT >> $seq.full
echo "*** PIDs file" >> $seq.full
cat $SCRATCH_MNT/pids >> $seq.full
ls -lh $SCRATCH_MNT >> $seqres.full
echo "*** PIDs file" >> $seqres.full
cat $SCRATCH_MNT/pids >> $seqres.full
cat $SCRATCH_MNT/pids | while read pid size
do
echo "*** checking file with $size integers"
echo checking pid=$pid size=$size >> $seq.full
echo checking pid=$pid size=$size >> $seqres.full
$here/src/append_reader $SCRATCH_MNT/testfile.$pid
status=$?
[ $status -ne 0 ] && \
echo "maybe corrupt O_APPEND to $SCRATCH_MOUNT/testfile.$pid!"
echo status: $status >> $seq.full
echo status: $status >> $seqres.full
done
# success, all done
+4 -1
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -61,7 +64,7 @@ FSSTRESS_ARGS=`_scale_fsstress_args \
-f attr_set=100 \
-f attr_remove=100 \
-p 1 -n 10000 -S c`
$FSSTRESS_PROG $FSSTRESS_ARGS >$seq.full 2>&1
$FSSTRESS_PROG $FSSTRESS_ARGS >$seqres.full 2>&1
status=$?
exit
+8 -5
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -64,9 +67,9 @@ _do_test()
echo "-----------------------------------------------"
echo "fstest.$_n : $_filter_param"
echo "-----------------------------------------------"
if ! $here/src/fstest $_param -p $out >>$seq.full
if ! $here/src/fstest $_param -p $out >>$seqres.full
then
echo " fstest ($_param) returned $? - see $seq.full"
echo " fstest ($_param) returned $? - see $seqres.full"
status=1
exit
fi
@@ -107,7 +110,7 @@ _process_args()
# real QA test starts here
rm -f $here/$seq.full
rm -f $here/$seqres.full
_supported_fs generic
_supported_os IRIX Linux
@@ -153,8 +156,8 @@ fi
# can override the params here
_process_args "$@"
echo "Params are for $param_type" >>$seq.full
echo "Params: n = $numchildren l = $numloops f = $numfiles" >>$seq.full
echo "Params are for $param_type" >>$seqres.full
echo "Params: n = $numchildren l = $numloops f = $numfiles" >>$seqres.full
_setup_testdir
+6 -3
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -133,12 +136,12 @@ 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
echo "Params are for $param_type" >>$seqres.full
echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seqres.full
_setup_testdir
rm -f $here/$seq.full
rm -f $here/$seqres.full
echo "brevity is wit..."
_check_test_fs
+10 -7
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -58,13 +61,13 @@ _require_scratch
echo "*** init fs"
rm -f $seq.full
rm -f $seqres.full
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** MKFS ***" >>$seq.full
echo "" >>$seq.full
_scratch_mkfs >>$seq.full 2>&1 \
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
_scratch_mkfs >>$seqres.full 2>&1 \
|| _fail "mkfs failed"
_scratch_mount >>$seq.full 2>&1 \
_scratch_mount >>$seqres.full 2>&1 \
|| _fail "mount failed"
echo "*** test concurrent block/fs access"
@@ -73,8 +76,8 @@ cat $SCRATCH_DEV >/dev/null &
pid=$!
FSSTRESS_ARGS=`_scale_fsstress_args -p 2 -n 2000 $FSSTRESS_AVOID`
echo "run fsstress with args: $FSSTRESS_ARGS" >>$seq.full
$FSSTRESS_PROG $FSSTRESS_ARGS >>$seq.full
echo "run fsstress with args: $FSSTRESS_ARGS" >>$seqres.full
$FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
_lets_get_pidst
_check_scratch_fs
+13 -10
View File
@@ -23,6 +23,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -56,29 +59,29 @@ _require_user
echo "*** create filesystem"
rm -f $seq.full
rm -f $seqres.full
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** MKFS ***" >>$seq.full
echo "" >>$seq.full
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
SIZE=`expr 50 \* 1024 \* 1024`
_scratch_mkfs_sized $SIZE >>$seq.full 2>&1 \
_scratch_mkfs_sized $SIZE >>$seqres.full 2>&1 \
|| _fail "mkfs failed"
_scratch_mount >>$seq.full 2>&1 \
_scratch_mount >>$seqres.full 2>&1 \
|| _fail "mount failed"
mkdir $SCRATCH_MNT/subdir
echo "*** set default ACL"
setfacl -R -dm u:fsgqa:rwx,g::rwx,o::r-x,m::rwx $SCRATCH_MNT/subdir
echo "*** populate filesystem, pass #1" | tee -a $seq.full
cp -rf $filler $SCRATCH_MNT/subdir >$seq.full 2>&1
echo "*** populate filesystem, pass #1" | tee -a $seqres.full
cp -rf $filler $SCRATCH_MNT/subdir >$seqres.full 2>&1
echo "*** populate filesystem, pass #2" | tee -a $seq.full
cp -rf $filler $SCRATCH_MNT/subdir >$seq.full 2>&1
echo "*** populate filesystem, pass #2" | tee -a $seqres.full
cp -rf $filler $SCRATCH_MNT/subdir >$seqres.full 2>&1
_check_scratch_fs
echo "*** all done"
rm -f $seq.full
rm -f $seqres.full
status=0
exit

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