From: Steve Lord Date: Tue, 18 Jun 2002 20:32:20 +0000 (+0000) Subject: Fix test for v2 striped logs X-Git-Tag: v1.1.0~1076 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8c5b1cdc669dd31c5500467e0cb5e4333e523f28;p=xfstests-dev.git Fix test for v2 striped logs --- diff --git a/016 b/016 index 50d3752a..1a503aa5 100755 --- a/016 +++ b/016 @@ -139,6 +139,15 @@ _log_head() ' } +# Get log stripe unit for v2 logs; if none specified, +# (or v1 log) just return "1" + +_log_sunit() +{ + echo $MKFS_OPTIONS | (grep sunit || echo "sunit=1") \ + | sed "s/.*sunit=\(.*\).*/\1/" +} + _after_log() { xfs_db -r $1 -c "sb" -c "print" | $AWK_PROG ' @@ -179,10 +188,12 @@ size=`_log_size` echo "log size = $size BB" >>$seq.full head=`_log_head` echo "log position = $head" >>$seq.full +lsunit=`_log_sunit` +echo "log sunit = $lsunit" >>$seq.full [ $size -eq 4096 ] || \ _fail "!!! unexpected log size $size" -[ $head -eq 2 ] || \ +[ $head -eq 2 -o $head -eq $((lsunit/512)) ] || \ _fail "!!! unexpected initial log position $head" echo " lots of traffic" >>$seq.full