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
+9 -6
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`
@@ -47,9 +50,9 @@ _require_user
_need_to_be_root
# real QA test starts here
rm -f $seq.full
rm -f $seqres.full
_scratch_mkfs >> $seq.full 2>&1
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
quotacheck -u -g $SCRATCH_MNT 2>/dev/null
quotaon $SCRATCH_MNT 2>/dev/null
@@ -64,12 +67,12 @@ repquota -u -g $SCRATCH_MNT | grep -v "^root" | _filter_scratch
#
# We work around it by editing the context out of mtab. Sigh.
sed -i "s#^$SCRATCH_DEV\(.*\),context=\"system_u:object_r:nfs_t:s0\"#$SCRATCH_DEV\1#" /etc/mtab
mount -o remount,ro $SCRATCH_DEV 2>&1 | tee -a $seq.full | _filter_scratch
touch $SCRATCH_MNT/failed 2>&1 | tee -a $seq.full | _filter_scratch
mount -o remount,rw $SCRATCH_DEV 2>&1 | tee -a $seq.full | _filter_scratch
mount -o remount,ro $SCRATCH_DEV 2>&1 | tee -a $seqres.full | _filter_scratch
touch $SCRATCH_MNT/failed 2>&1 | tee -a $seqres.full | _filter_scratch
mount -o remount,rw $SCRATCH_DEV 2>&1 | tee -a $seqres.full | _filter_scratch
$XFS_IO_PROG -F -c 'pwrite 0 8k' -c 'fsync' \
$SCRATCH_MNT/testfile >>$seq.full 2>&1
$SCRATCH_MNT/testfile >>$seqres.full 2>&1
repquota -u -g $SCRATCH_MNT | grep -v "^root" | _filter_scratch
umount $SCRATCH_DEV 2>/dev/null