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" echo "*** reset partition"
$here/src/devzero -b 2048 -n 50 -v 198 $SCRATCH_DEV $here/src/devzero -b 2048 -n 50 -v 198 $SCRATCH_DEV
echo "*** mkfs" echo "*** mkfs"
lsize=2097152 force_opts="-dsize=50m -lsize=2097152"
dsize=50m echo mkfs_xfs $force_opts $SCRATCH_DEV >>$seq.full
echo mkfs_xfs -dsize=$dsize -lsize=$lsize $SCRATCH_DEV >>$seq.full mkfs_xfs $force_opts $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
if ! mkfs_xfs -dsize=$dsize -lsize=$lsize $SCRATCH_DEV >>$seq.full 2>&1 source $tmp.mkfs
then
echo "failed to mkfs $SCRATCH_DEV" >>$seq.full
_notrun "mkfs cannot create scratch fs, probably too small log"
exit 1
fi
} }
_log_traffic() _log_traffic()
@@ -140,12 +135,15 @@ _log_head()
} }
# Get log stripe unit for v2 logs; if none specified, # 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() _log_sunit()
{ {
echo $MKFS_OPTIONS | (grep sunit || echo "sunit=1") \ if [ $lsunit -eq 0 ]; then
| sed "s/.*sunit=\(.*\).*/\1/" echo $dbsize
else
expr $lsunit \* $dbsize
fi
} }
_after_log() _after_log()
@@ -194,7 +192,7 @@ echo "log sunit = $lsunit" >>$seq.full
[ $size -eq 4096 ] || \ [ $size -eq 4096 ] || \
_fail "!!! unexpected log size $size" _fail "!!! unexpected log size $size"
[ $head -eq 2 -o $head -eq $((lsunit/512)) ] || \ [ $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 echo " lots of traffic" >>$seq.full
_log_traffic 850 _log_traffic 850
+19 -7
View File
@@ -61,9 +61,13 @@ _attr()
{ {
attr $* 2>$tmp.err >$tmp.out attr $* 2>$tmp.err >$tmp.out
exit=$? 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 $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 $tmp.err 1>&2
return $exit return $exit
} }
@@ -72,9 +76,13 @@ _getfattr()
{ {
getfattr $* 2>$tmp.err >$tmp.out getfattr $* 2>$tmp.err >$tmp.out
exit=$? 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 $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 $tmp.err 1>&2
return $exit return $exit
} }
@@ -88,11 +96,11 @@ umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** mkfs" echo "*** mkfs"
mkfs_xfs $SCRATCH_DEV >/dev/null \ mkfs_xfs $SCRATCH_DEV >/dev/null \
|| _fail "mkfs failed" || _fail "mkfs failed"
echo "*** mount FS" echo "*** mount FS"
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >/dev/null \ mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >/dev/null \
|| _fail "mount failed" || _fail "mount failed"
testfile=$SCRATCH_MNT/testfile testfile=$SCRATCH_MNT/testfile
echo "*** make test file 1" echo "*** make test file 1"
@@ -112,7 +120,11 @@ echo "value_2" | _attr -s "a2-----" $testfile.2 >/dev/null
_getfattr --absolute-names $testfile.2 _getfattr --absolute-names $testfile.2
# print name and size from 1st line of output # 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 # print out the rest of the data apart from the header
# the size is +1 for an extra \n at the end # 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/log file: "([\w|\/.-]+)" daddr: (\d+) length: (\d+)/log device: LDEV daddr: XXX length: XXX/;
s/skipped (\w+) zeroed blocks/skipped XXX zeroed blocks/; s/skipped (\w+) zeroed blocks/skipped XXX zeroed blocks/;
s/^uuid: *[0-9a-f-][0-9a-f-]* *format: *.*$/uuid: <UUID> format: <FORMAT>/; 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>/; s/version: \d/version: <VERN>/;
print; print;
' '
+1 -1
View File
@@ -12,7 +12,7 @@ xfs_logprint:
log device: LDEV daddr: XXX length: XXX log device: LDEV daddr: XXX length: XXX
cycle: 1 version: <VERN> lsn: 1,0 tail_lsn: 1,0 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> uuid: <UUID> format: <FORMAT>
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
Oper (0): tid: b0c0d0d0 len: 8 clientid: LOG flags: UNMOUNT 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 postargs="" # for any special post-device options
# minix and msdos mkfs fails for large devices, restrict to 2000 blocks # minix and msdos mkfs fails for large devices, restrict to 2000 blocks
[ $fs = "minix" ] && postargs=2000 [ $fs = minix ] && postargs=2000
[ $fs = "msdos" ] && postargs=2000 [ $fs = msdos ] && postargs=2000
# these folk prompt before writing # these folks prompt before writing
[ $fs = "jfs" ] && preop="echo Y |" [ $fs = jfs ] && preop="echo Y |"
[ $fs = "reiserfs" ] && 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 # overwite the first few Kb - should blow away superblocks
src/devzero -n 20 $SCRATCH_DEV >/dev/null src/devzero -n 20 $SCRATCH_DEV >/dev/null
+1 -1
View File
@@ -7,7 +7,7 @@ run_bonnie()
mkdir ./bonnie || exit 1 mkdir ./bonnie || exit 1
defaults="-d ./bonnie -q -f -r 0" 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 bonnie++ -m '' $defaults $@ >$tmp/bonnie.stdout 2>$tmp/bonnie.stderr
status=$? status=$?
rm -fr ./bonnie rm -fr ./bonnie