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
+10
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user