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
+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
+11 -8
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,8 +42,8 @@ trap "_cleanup" 0 1 2 3 15
_populate_scratch()
{
echo "=== mkfs output ===" >>$seq.full
_scratch_mkfs_xfs | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs
echo "=== mkfs output ===" >>$seqres.full
_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
. $tmp.mkfs
_scratch_mount
dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
@@ -64,7 +67,7 @@ _need_to_be_root
_require_scratch
_require_no_large_scratch_dev
rm -f $seq.full
rm -f $seqres.full
_populate_scratch
@@ -72,16 +75,16 @@ _populate_scratch
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
echo "df gave: blocks=$blocks used=$used avail=$avail" >>$seqres.full
echo "blocksize from mkfs is '$dbsize'" >>$seqres.full
xfs_db -r -c "freesp -s" $SCRATCH_DEV >$tmp.xfs_db
echo "xfs_db for $SCRATCH_DEV" >>$seq.full
cat $tmp.xfs_db >>$seq.full
echo "xfs_db for $SCRATCH_DEV" >>$seqres.full
cat $tmp.xfs_db >>$seqres.full
eval `$XFS_IO_PROG -x -c resblks $SCRATCH_MNT 2>&1 \
| $AWK_PROG '/available/ { printf "resblks=%u\n", $5 }'`
echo "resblks gave: resblks=$resblks" >>$seq.full
echo "resblks gave: resblks=$resblks" >>$seqres.full
# check the 'blocks' field from freesp command is OK
# since 2.6.18, df does not report the 4 blocks per AG that cannot
+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
@@ -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
@@ -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`
+20 -17
View File
@@ -36,6 +36,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -72,7 +75,7 @@ _init()
if _scratch_mkfs_xfs -N -K $force_opts >/dev/null 2>&1; then
force_opts="-K $force_opts"
fi
echo mkfs_xfs $force_opts $SCRATCH_DEV >>$seq.full
echo mkfs_xfs $force_opts $SCRATCH_DEV >>$seqres.full
_scratch_mkfs_xfs $force_opts >$tmp.mkfs0 2>&1
[ $? -ne 0 ] && \
_notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
@@ -163,8 +166,8 @@ _check_corrupt()
{
f="c6c6c6c6"
echo "*** check for corruption"
echo "expect $f..." >>$seq.full
xfs_db -r -c "fsblock $2" -c "print" $1 | head | tee -a $seq.full | \
echo "expect $f..." >>$seqres.full
xfs_db -r -c "fsblock $2" -c "print" $1 | head | tee -a $seqres.full | \
grep -q -v "$f $f $f $f $f $f $f $f" && \
_fail "!!! block $2 corrupted!"
}
@@ -177,7 +180,7 @@ _check_corrupt()
_supported_fs xfs
_supported_os Linux
rm -f $seq.full
rm -f $seqres.full
# mkfs sizes
log_size=2097152
@@ -187,15 +190,15 @@ _require_scratch
_init
block=`_after_log $SCRATCH_DEV`
echo "fsblock after log = $block" >>$seq.full
echo "fsblock after log = $block" >>$seqres.full
_check_corrupt $SCRATCH_DEV $block
actual_log_size=`_log_size`
echo "log size = $actual_log_size BB" >>$seq.full
echo "log size = $actual_log_size BB" >>$seqres.full
head=`_log_head`
echo "log position = $head" >>$seq.full
echo "log position = $head" >>$seqres.full
lsunit=`_log_sunit`
echo "log sunit = $lsunit" >>$seq.full
echo "log sunit = $lsunit" >>$seqres.full
# sanity checks
[ $actual_log_size -eq $log_size_bb ] || \
@@ -206,36 +209,36 @@ echo "log sunit = $lsunit" >>$seq.full
# find how how many blocks per op for 100 ops
# ignore the fact that it will also include an unmount record etc...
# this should be small overall
echo " lots of traffic for sampling" >>$seq.full
echo " lots of traffic for sampling" >>$seqres.full
sample_size_ops=100
_log_traffic $sample_size_ops
head1=`_log_head`
num_blocks=`expr $head1 - $head`
blocks_per_op=`echo "scale=3; $num_blocks / $sample_size_ops" | bc`
echo "blocks_per_op = $blocks_per_op" >>$seq.full
echo "blocks_per_op = $blocks_per_op" >>$seqres.full
num_expected_ops=`echo "$log_size_bb / $blocks_per_op" | bc`
echo "num_expected_ops = $num_expected_ops" >>$seq.full
echo "num_expected_ops = $num_expected_ops" >>$seqres.full
num_expected_to_go=`echo "$num_expected_ops - $sample_size_ops" | bc`
echo "num_expected_to_go = $num_expected_to_go" >>$seq.full
echo "num_expected_to_go = $num_expected_to_go" >>$seqres.full
echo " lots more traffic" >>$seq.full
echo " lots more traffic" >>$seqres.full
_log_traffic $num_expected_to_go
head=`_log_head`
echo "log position = $head" >>$seq.full
echo "log position = $head" >>$seqres.full
# e.g. 3891
near_end_min=`echo "0.95 * $log_size_bb" | bc | sed 's/\..*//'`
echo "near_end_min = $near_end_min" >>$seq.full
echo "near_end_min = $near_end_min" >>$seqres.full
[ $head -gt $near_end_min -a $head -lt $log_size_bb ] || \
_fail "!!! unexpected near end log position $head"
for c in `seq 0 20`
do
echo " little traffic" >>$seq.full
echo " little traffic" >>$seqres.full
_log_traffic 2
head=`_log_head`
echo "log position = $head" >>$seq.full
echo "log position = $head" >>$seqres.full
_check_corrupt $SCRATCH_DEV $block
done
+18 -15
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`
@@ -52,13 +55,13 @@ _require_no_large_scratch_dev
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_xfs >>$seq.full 2>&1 \
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
_scratch_mkfs_xfs >>$seqres.full 2>&1 \
|| _fail "mkfs failed"
_scratch_mount >>$seq.full 2>&1 \
_scratch_mount >>$seqres.full 2>&1 \
|| _fail "mount failed"
echo "*** test"
@@ -67,21 +70,21 @@ for l in 0 1 2 3 4
do
echo " *** test $l"
FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID`
$FSSTRESS_PROG $FSSTRESS_ARGS >>$seq.full
$FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
_scratch_mount -o remount,ro \
|| _fail "remount ro failed"
echo "" >>$seq.full
echo "*** xfs_logprint ***" >>$seq.full
echo "" >>$seq.full
_scratch_xfs_logprint -tb | tee -a $seq.full \
echo "" >>$seqres.full
echo "*** xfs_logprint ***" >>$seqres.full
echo "" >>$seqres.full
_scratch_xfs_logprint -tb | tee -a $seqres.full \
| head | grep -q "<CLEAN>" || _fail "DIRTY LOG"
echo "" >>$seq.full
echo "*** XFS_CHECK ***" >>$seq.full
echo "" >>$seq.full
_scratch_xfs_check >>$seq.full 2>&1 \
echo "" >>$seqres.full
echo "*** XFS_CHECK ***" >>$seqres.full
echo "" >>$seqres.full
_scratch_xfs_check >>$seqres.full 2>&1 \
|| _fail "xfs_check failed"
_scratch_mount -o remount,rw \
|| _fail "remount rw failed"
@@ -89,6 +92,6 @@ done
echo "*** done"
# happy exit
rm -f $seq.full
rm -f $seqres.full
status=0
exit 0
+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`
@@ -47,7 +50,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fs xfs
_supported_os IRIX Linux
# prelim
rm -f $seq.full $tmp.*
rm -f $seqres.full $tmp.*
_require_scratch
_require_v2log
+4 -1
View File
@@ -23,11 +23,14 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
seqfull="$seq.full"
seqfull="$seqres.full"
status=1 # failure is the default!
# get standard environment, filters and checks
. ./common.rc
+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`
@@ -78,7 +81,7 @@ _supported_os Linux
_require_scratch
_require_attrs
rm -f $seq.full
rm -f $seqres.full
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** mkfs"
@@ -124,7 +127,7 @@ echo ""
inum_2=`ls -li $testfile.2 | $AWK_PROG '{ print $1 }'`
echo "*** unmount FS"
umount $SCRATCH_DEV >>$seq.full 2>&1 \
umount $SCRATCH_DEV >>$seqres.full 2>&1 \
|| _fail "umount failed"
echo "*** dump attributes (1)"
+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`
+3
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`
+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`
@@ -42,11 +45,11 @@ _require_tape $TAPE_DEV
_create_dumpdir_fill
# ensure file/dir timestamps precede dump timestamp
sleep 2
src/bstat $SCRATCH_MNT >>$here/$seq.full
src/bstat $SCRATCH_MNT >>$here/$seqres.full
_erase_hard
_do_dump
_append_dumpdir_fill
src/bstat $SCRATCH_MNT >>$here/$seq.full
src/bstat $SCRATCH_MNT >>$here/$seqres.full
_erase_hard
_do_dump -l 1
_do_restore
+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
@@ -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
@@ -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`
+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`
@@ -59,7 +62,7 @@ while [ $i -lt 5 ]; do
let i=$i+1
done
echo "middate = $middate" >>$seq.full
echo "middate = $middate" >>$seqres.full
#
# Now do the xfsinvutil and
+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
@@ -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`
+9 -6
View File
@@ -23,13 +23,16 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=1 # failure is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
rm -f $seq.full
rm -f $seqres.full
# get standard environment, filters and checks
. ./common.rc
@@ -41,15 +44,15 @@ _link_out_file $seq.out
_check_repair()
{
echo "Repairing, round 0" >> $seq.full
_scratch_xfs_repair 2>&1 | _filter_repair | tee -a $seq.full >$tmp.0
echo "Repairing, round 0" >> $seqres.full
_scratch_xfs_repair 2>&1 | _filter_repair | tee -a $seqres.full >$tmp.0
for i in 1 2 3 4
do
echo "Repairing, iteration $i" | tee -a $seq.full
echo "Repairing, iteration $i" | tee -a $seqres.full
_scratch_xfs_repair 2>&1 | _filter_repair >$tmp.$i
diff $tmp.0 $tmp.$i >> $seq.full
diff $tmp.0 $tmp.$i >> $seqres.full
if [ $? -ne 0 ]; then
echo "ERROR: repair round $i differs to round 0 (see $seq.full)" | tee -a $seq.full
echo "ERROR: repair round $i differs to round 0 (see $seqres.full)" | tee -a $seqres.full
break
fi
# echo all interesting stuff...

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