Several QA test updates to fix failures on v2 logs and redhat 9.

Fix some log offset calculations when version 2 logs are in use.
This commit is contained in:
fsgqa
2003-05-14 05:25:31 +00:00
parent 5250291d42
commit 1d1d92fa46
6 changed files with 40 additions and 27 deletions
+11 -13
View File
@@ -78,15 +78,10 @@ _init()
echo "*** reset partition"
$here/src/devzero -b 2048 -n 50 -v 198 $SCRATCH_DEV
echo "*** mkfs"
lsize=2097152
dsize=50m
echo mkfs_xfs -dsize=$dsize -lsize=$lsize $SCRATCH_DEV >>$seq.full
if ! mkfs_xfs -dsize=$dsize -lsize=$lsize $SCRATCH_DEV >>$seq.full 2>&1
then
echo "failed to mkfs $SCRATCH_DEV" >>$seq.full
_notrun "mkfs cannot create scratch fs, probably too small log"
exit 1
fi
force_opts="-dsize=50m -lsize=2097152"
echo mkfs_xfs $force_opts $SCRATCH_DEV >>$seq.full
mkfs_xfs $force_opts $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
source $tmp.mkfs
}
_log_traffic()
@@ -140,12 +135,15 @@ _log_head()
}
# Get log stripe unit for v2 logs; if none specified,
# (or v1 log) just return "1"
# (or v1 log) just return "1" block
_log_sunit()
{
echo $MKFS_OPTIONS | (grep sunit || echo "sunit=1") \
| sed "s/.*sunit=\(.*\).*/\1/"
if [ $lsunit -eq 0 ]; then
echo $dbsize
else
expr $lsunit \* $dbsize
fi
}
_after_log()
@@ -194,7 +192,7 @@ echo "log sunit = $lsunit" >>$seq.full
[ $size -eq 4096 ] || \
_fail "!!! unexpected log size $size"
[ $head -eq 2 -o $head -eq $((lsunit/512)) ] || \
_fail "!!! unexpected initial log position $head"
_fail "!!! unexpected initial log position $head vs. $((lsunit/512))"
echo " lots of traffic" >>$seq.full
_log_traffic 850
+19 -7
View File
@@ -61,9 +61,13 @@ _attr()
{
attr $* 2>$tmp.err >$tmp.out
exit=$?
sed -e "s#$SCRATCH_MNT[^ .:]*#<TESTFILE>#g; s#$tmp[^ :]*#<TMPFILE>#g;"\
sed \
-e "s#$SCRATCH_MNT[^ .:]*#<TESTFILE>#g" \
-e "s#$tmp[^ :]*#<TMPFILE>#g;" \
$tmp.out
sed -e "s#$SCRATCH_MNT[^ .:]*#<TESTFILE>#g; s#$tmp[^ :]*#<TMPFILE>#g;"\
sed \
-e "s#$SCRATCH_MNT[^ .:]*#<TESTFILE>#g" \
-e "s#$tmp[^ :]*#<TMPFILE>#g;" \
$tmp.err 1>&2
return $exit
}
@@ -72,9 +76,13 @@ _getfattr()
{
getfattr $* 2>$tmp.err >$tmp.out
exit=$?
sed -e "s#$SCRATCH_MNT[^ .:]*#<TESTFILE>#g; s#$tmp[^ :]*#<TMPFILE>#g;"\
sed \
-e "s#$SCRATCH_MNT[^ .:]*#<TESTFILE>#g" \
-e "s#$tmp[^ :]*#<TMPFILE>#g;" \
$tmp.out
sed -e "s#$SCRATCH_MNT[^ .:]*#<TESTFILE>#g; s#$tmp[^ :]*#<TMPFILE>#g;"\
sed \
-e "s#$SCRATCH_MNT[^ .:]*#<TESTFILE>#g" \
-e "s#$tmp[^ :]*#<TMPFILE>#g;" \
$tmp.err 1>&2
return $exit
}
@@ -88,11 +96,11 @@ umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** mkfs"
mkfs_xfs $SCRATCH_DEV >/dev/null \
|| _fail "mkfs failed"
echo "*** mount FS"
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >/dev/null \
|| _fail "mount failed"
testfile=$SCRATCH_MNT/testfile
echo "*** make test file 1"
@@ -112,7 +120,11 @@ echo "value_2" | _attr -s "a2-----" $testfile.2 >/dev/null
_getfattr --absolute-names $testfile.2
# print name and size from 1st line of output
_attr -g "a3" $testfile.2 | head -1
_attr -g "a3" $testfile.2 > $tmp.hahahahaplonk
head -1 $tmp.hahahahaplonk
# NOTE:
# Above goo works around some truly bizzaro sh/sed/head interaction
# for some versions of these tools (fails on Redhat 7+, 6.2 worked)
# print out the rest of the data apart from the header
# the size is +1 for an extra \n at the end
+1
View File
@@ -68,6 +68,7 @@ _filter_logprint()
s/log file: "([\w|\/.-]+)" daddr: (\d+) length: (\d+)/log device: LDEV daddr: XXX length: XXX/;
s/skipped (\w+) zeroed blocks/skipped XXX zeroed blocks/;
s/^uuid: *[0-9a-f-][0-9a-f-]* *format: *.*$/uuid: <UUID> format: <FORMAT>/;
s/(length of Log Record:) \d+/$1 <LEN>/;
s/version: \d/version: <VERN>/;
print;
'
+1 -1
View File
@@ -12,7 +12,7 @@ xfs_logprint:
log device: LDEV daddr: XXX length: XXX
cycle: 1 version: <VERN> lsn: 1,0 tail_lsn: 1,0
length of Log Record: 20 prev offset: -1 num ops: 1
length of Log Record: <LEN> prev offset: -1 num ops: 1
uuid: <UUID> format: <FORMAT>
----------------------------------------------------------------------------
Oper (0): tid: b0c0d0d0 len: 8 clientid: LOG flags: UNMOUNT
+7 -5
View File
@@ -64,11 +64,13 @@ do
postargs="" # for any special post-device options
# minix and msdos mkfs fails for large devices, restrict to 2000 blocks
[ $fs = "minix" ] && postargs=2000
[ $fs = "msdos" ] && postargs=2000
# these folk prompt before writing
[ $fs = "jfs" ] && preop="echo Y |"
[ $fs = "reiserfs" ] && preop="echo y |"
[ $fs = minix ] && postargs=2000
[ $fs = msdos ] && postargs=2000
# these folks prompt before writing
[ $fs = jfs ] && preop="echo Y |"
[ $fs = reiserfs ] && preop="echo y |"
# cramfs mkfs requires a directory argument
[ $fs = cramfs ] && preargs=/proc/fs/xfs
# overwite the first few Kb - should blow away superblocks
src/devzero -n 20 $SCRATCH_DEV >/dev/null
+1 -1
View File
@@ -7,7 +7,7 @@ run_bonnie()
mkdir ./bonnie || exit 1
defaults="-d ./bonnie -q -f -r 0"
defaults="$default -u "`id -u`" -g "`id -g`
defaults="$defaults -u "`id -u`" -g "`id -g`
bonnie++ -m '' $defaults $@ >$tmp/bonnie.stdout 2>$tmp/bonnie.stderr
status=$?
rm -fr ./bonnie