updates to run (more) cleanly with quota mount option(s). expanded

notrun messages for those tests which are skipped with more details.
This commit is contained in:
Nathan Scott
2001-04-23 07:37:39 +00:00
parent 7825d5c1f3
commit 1bd11aa834
10 changed files with 7138 additions and 7590 deletions
+22 -10
View File
@@ -45,7 +45,14 @@ 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
_cleanup()
{
umount $SCRATCH_DEV 2>/dev/null
rm -f $tmp.*
}
trap "_cleanup; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks
. ./common.rc
@@ -74,17 +81,22 @@ size="-d size=100m"
mkfs -t xfs -f $size $SCRATCH_DEV >/dev/null 2>&1
if [ $? -ne 0 ] # probably don't have a big enough scratch
then
size=""
src/devzero -v -1 $SCRATCH_DEV >/dev/null
_notrun "SCRATCH_DEV too small, results would be non-deterministic"
else
clear=""
eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne '
if (/byte offset (\d+), length (\d+)/) {
print "clear=", $1 / 512, "\n"; exit
}'`
[ -z "$clear" ] && echo "Cannot calculate length to clear"
src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
src/feature -U $SCRATCH_DEV && \
_notrun "Quota are enabled, test needs controlled sb recovery"
src/feature -G $SCRATCH_DEV && \
_notrun "Quota are enabled, test needs controlled sb recovery"
umount $SCRATCH_DEV
fi
clear=""
eval `xfs_db -r -c "sb 1" -c stack $SCRATCH_DEV | perl -ne '
if (/byte offset (\d+), length (\d+)/) {
print "clear=", $1 / 512, "\n"; exit
}'`
[ -z "$clear" ] && echo "Cannot calculate length to clear"
src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
# now kick off the real repair test...
#