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
+2 -1
View File
@@ -106,6 +106,7 @@ cat <<End-of-File >$id
#
# creator
seq=\`basename \$0\`
seqres=$RESULT_DIR/$seq
echo "QA output created by \$seq"
here=\`pwd\`
@@ -134,7 +135,7 @@ exit
# 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)"
#echo "If failure, check \$seqres.full (this) and \$seqres.full.ok (reference)"
# success, all done
status=0
+4
View File
@@ -23,6 +23,10 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
+4
View File
@@ -23,6 +23,10 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
+4
View File
@@ -22,6 +22,10 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
+21 -17
View File
@@ -26,6 +26,10 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -36,7 +40,7 @@ noise_pid=0
_cleanup()
{
if [ $noise_pid -ne 0 ]; then
echo "background noise kill $noise_pid" >>$seq.full
echo "background noise kill $noise_pid" >>$seqres.full
kill $noise_pid
noise_pid=0
wait
@@ -60,7 +64,7 @@ _require_no_large_scratch_dev
_require_btrfs inspect-internal
_require_command "/usr/sbin/filefrag"
rm -f $seq.full
rm -f $seqres.full
FILEFRAG_FILTER='if (/, blocksize (\d+)/) {$blocksize = $1; next} ($ext, '\
'$logical, $physical, $expected, $length, $flags) = (/^\s*(\d+)\s+(\d+)'\
@@ -74,18 +78,18 @@ FILEFRAG_FILTER='if (/, blocksize (\d+)/) {$blocksize = $1; next} ($ext, '\
# sample output: "1234#10#5678" -> physical 1234, length 10, logical 5678
_filter_extents()
{
tee -a $seq.full | $PERL_PROG -ne "$FILEFRAG_FILTER"
tee -a $seqres.full | $PERL_PROG -ne "$FILEFRAG_FILTER"
}
_check_file_extents()
{
cmd="filefrag -v $1"
echo "# $cmd" >> $seq.full
echo "# $cmd" >> $seqres.full
out=`$cmd | _filter_extents`
if [ -z "$out" ]; then
return 1
fi
echo "after filter: $out" >> $seq.full
echo "after filter: $out" >> $seqres.full
echo $out
return 0
}
@@ -101,9 +105,9 @@ _btrfs_inspect_addr()
expect_inum=$4
file=$5
cmd="$BTRFS_UTIL_PROG inspect-internal logical-resolve -P $addr $mp"
echo "# $cmd" >> $seq.full
echo "# $cmd" >> $seqres.full
out=`$cmd`
echo "$out" >> $seq.full
echo "$out" >> $seqres.full
grep_expr="inode $expect_inum offset $expect_addr root"
echo "$out" | grep "^$grep_expr 5$" >/dev/null
ret=$?
@@ -134,9 +138,9 @@ _btrfs_inspect_inum()
snap_name=$3
mp="$SCRATCH_MNT/$snap_name"
cmd="$BTRFS_UTIL_PROG inspect-internal inode-resolve $inum $mp"
echo "# $cmd" >> $seq.full
echo "# $cmd" >> $seqres.full
out=`$cmd`
echo "$out" >> $seq.full
echo "$out" >> $seqres.full
grep_expr="^$file$"
cnt=`echo "$out" | grep "$grep_expr" | wc -l`
if [ $cnt -ge "1" ]; then
@@ -157,9 +161,9 @@ _btrfs_inspect_check()
logical=$4
snap_name=$5
cmd="stat -c %i $file"
echo "# $cmd" >> $seq.full
echo "# $cmd" >> $seqres.full
inum=`$cmd`
echo "$inum" >> $seq.full
echo "$inum" >> $seqres.full
_btrfs_inspect_addr $SCRATCH_MNT $physical $logical $inum $file
ret=$?
if [ $ret -eq 0 ]; then
@@ -178,9 +182,9 @@ workout()
do_bg_noise=$5
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** mkfs -dsize=$fsz" >>$seq.full
echo "" >>$seq.full
_scratch_mkfs_sized $fsz >>$seq.full 2>&1 \
echo "*** mkfs -dsize=$fsz" >>$seqres.full
echo "" >>$seqres.full
_scratch_mkfs_sized $fsz >>$seqres.full 2>&1 \
|| _fail "size=$fsz mkfs failed"
run_check _scratch_mount
# -w ensures that the only ops are ones which cause write I/O
@@ -210,13 +214,13 @@ workout()
if [ $do_bg_noise -ne 0 ]; then
# make background noise while backrefs are being walked
while /bin/true; do
echo background fsstress >>$seq.full
echo background fsstress >>$seqres.full
run_check $FSSTRESS_PROG -d $SCRATCH_MNT/bgnoise -n 999
echo background rm >>$seq.full
echo background rm >>$seqres.full
rm -rf $SCRATCH_MNT/bgnoise/
done &
noise_pid=`jobs -p %1`
echo "background noise by $noise_pid" >>$seq.full
echo "background noise by $noise_pid" >>$seqres.full
fi
cnt=0
+4
View File
@@ -22,6 +22,10 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here="`pwd`"
tmp=/tmp/$$
+8 -4
View File
@@ -23,6 +23,10 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "== QA output created by $seq"
here=`pwd`
@@ -48,16 +52,16 @@ _supported_os Linux
_require_scratch
_require_scratch_dev_pool
rm -f $seq.full
rm -f $seqres.full
FIRST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'`
LAST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $NF}'`
TOTAL_DEVS=`echo $SCRATCH_DEV $SCRATCH_DEV_POOL | wc -w`
LABEL=TestLabel.$seq
echo "Scratch $SCRATCH_DEV First $FIRST_POOL_DEV last $LAST_POOL_DEV Total $TOTAL_DEVS" > $seq.full
echo "Scratch $SCRATCH_DEV First $FIRST_POOL_DEV last $LAST_POOL_DEV Total $TOTAL_DEVS" > $seqres.full
_scratch_mkfs $SCRATCH_DEV_POOL >> $seq.full 2>&1 || _fail "mkfs failed"
_scratch_mkfs $SCRATCH_DEV_POOL >> $seqres.full 2>&1 || _fail "mkfs failed"
# These have to be done unmounted...?
echo "== Set filesystem label to $LABEL"
@@ -72,7 +76,7 @@ echo "== Show filesystem by label"
$BTRFS_UTIL_PROG filesystem show $LABEL | _filter_btrfs_filesystem_show $TOTAL_DEVS
UUID=`$BTRFS_UTIL_PROG filesystem show $LABEL | grep uuid: | awk '{print $NF}'`
echo "UUID $UUID" >> $seq.full
echo "UUID $UUID" >> $seqres.full
echo "== Show filesystem by UUID"
$BTRFS_UTIL_PROG filesystem show $UUID | _filter_btrfs_filesystem_show $TOTAL_DEVS $UUID
+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`
@@ -40,7 +43,7 @@ _supported_os Linux
_need_to_be_root
_require_scratch
_scratch_mkfs_sized $((128 * 1024 * 1024)) >> $seq.full 2>&1
_scratch_mkfs_sized $((128 * 1024 * 1024)) >> $seqres.full 2>&1
# -onoload and EXT4_SYNC_FL on file is important becase result in
# metadata sync writes inside ext4_handle_dirty_metadata()
+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`
@@ -101,13 +104,13 @@ _workout()
echo ""
echo " Start defragment activity"
echo ""
cat $tmp-$seq.fio >> $seq.full
cat $tmp-$seq.fio >> $seqres.full
run_check $FIO_PROG $tmp-$seq.fio
}
_require_fio $tmp-$seq.fio
_scratch_mkfs >> $seq.full 2>&1
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
if ! _workout; then
+5 -2
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`
@@ -117,13 +120,13 @@ _workout()
echo ""
echo " Start defragment activity"
echo ""
cat $tmp-$seq.fio >> $seq.full
cat $tmp-$seq.fio >> $seqres.full
run_check $FIO_PROG $tmp-$seq.fio
}
_require_fio $tmp-$seq.fio
_scratch_mkfs >> $seq.full 2>&1
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
if ! _workout; then
+5 -2
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`
@@ -127,13 +130,13 @@ _workout()
echo ""
echo " Start defragment activity"
echo ""
cat $tmp-$seq.fio >> $seq.full
cat $tmp-$seq.fio >> $seqres.full
run_check $FIO_PROG $tmp-$seq.fio
}
_require_fio $tmp-$seq.fio
_scratch_mkfs >> $seq.full 2>&1
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
if ! _workout; then
+5 -2
View File
@@ -25,6 +25,9 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
@@ -104,13 +107,13 @@ _workout()
echo ""
echo " Start defragment activity"
echo ""
cat $tmp-$seq.fio >> $seq.full
cat $tmp-$seq.fio >> $seqres.full
run_check $FIO_PROG $tmp-$seq.fio
}
_require_fio $tmp-$seq.fio
_scratch_mkfs >> $seq.full 2>&1
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
if ! _workout; then
+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

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