mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
committed by
Rich Johnston
parent
1686f9abfc
commit
1d5d46db80
+9
-6
@@ -35,12 +35,15 @@ filesize=10
|
||||
filename=test-190
|
||||
|
||||
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=0 # success is the default!
|
||||
rm -f $seq.full
|
||||
rm -f $seqres.full
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
@@ -55,20 +58,20 @@ _scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
fsblocksize=`xfs_info $SCRATCH_MNT|sed 's/=/ /g'|awk '/^data / { print $3 }'`
|
||||
|
||||
dd if=/dev/zero of=$SCRATCH_MNT/$filename bs=1024k count=10 >> $seq.full 2>&1
|
||||
dd if=/dev/zero of=$SCRATCH_MNT/$filename bs=1024k count=10 >> $seqres.full 2>&1
|
||||
|
||||
# run DMAPI test using verbose output
|
||||
echo Punching holes in file
|
||||
echo Punching holes in file >> $seq.full
|
||||
echo Punching holes in file >> $seqres.full
|
||||
for i in $holes ; do
|
||||
echo xfs_io -c "unresvsp `echo $i |$SED_PROG 's/:/ /g'`" $SCRATCH_MNT/$filename >> $seq.full
|
||||
echo xfs_io -c "unresvsp `echo $i |$SED_PROG 's/:/ /g'`" $SCRATCH_MNT/$filename >> $seqres.full
|
||||
xfs_io -c "unresvsp `echo $i |$SED_PROG 's/:/ /g'`" $SCRATCH_MNT/$filename ;
|
||||
done
|
||||
|
||||
echo Verifying holes are in the correct spots:
|
||||
|
||||
xfs_bmap=`xfs_bmap $SCRATCH_MNT/$filename`
|
||||
xfs_bmap $SCRATCH_MNT/$filename >> $seq.full
|
||||
xfs_bmap $SCRATCH_MNT/$filename >> $seqres.full
|
||||
for i in $holes ; do
|
||||
holeStart=$[`echo $i|$SED_PROG 's/:/ /g'|awk '{print $1}'`];
|
||||
holeEnd=$[`echo $i|$SED_PROG 's/:/ /g'|awk '{print $2}'`];
|
||||
@@ -83,7 +86,7 @@ for i in $holes ; do
|
||||
#xfs_bmap prints holes in the following format
|
||||
# 1: [8..15]: hole
|
||||
bmap="\[$[$holeStart/512]..$[($holeEnd/512) -1]\]";
|
||||
echo $bmap >> $seq.full
|
||||
echo $bmap >> $seqres.full
|
||||
if [ $holeEnd == $holeStart ] ; then
|
||||
continue #there is no hole
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user