3 # check 2^31 volume switching for pmlogextract
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
6 # Copyright (c) 2012 Red Hat.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
17 rm -f $seq.full tmparch
/big2.
* tmparch
/big3.
*
18 .
/tmparch
/mkbig1
> $seq.full
2>&1
19 [ $?
-eq 0 ] || _notrun
`cat $seq.full`
21 # 10GB should keep us out of trouble
22 free
=`_check_freespace 10240`
23 [ -z "$free" ] || _notrun
$free
25 status
=1 # failure is the default!
26 trap "rm -f $tmp.* tmparch/big2.* tmparch/big3.*; exit \$status" 0 1 2 3 15
28 for file in tmparch
/big1.
*
30 ln $file `echo $file | sed -e 's/big1/big2/'`
33 ls -l tmparch
/big1
* tmparch
/big2
* >$seq.full
2>&1
38 -e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g'
41 # real QA test starts here
42 pmlogextract tmparch
/big1 tmparch
/big2 tmparch
/big3
2>&1 | _filter
43 ls -l tmparch
/big3
* >>$seq.full
2>&1
45 # expect 3 volumes, and all < 2^31 bytes in size
48 nvol
=`ls tmparch/big3.? | wc -l | sed -e 's/ //g'`
52 echo "Error: expecting 3 volumes, found $nvol"
57 for vol
in tmparch
/big1.?
60 echo "+2*$size" >>$tmp.
bc
63 for vol
in tmparch
/big3.?
69 echo "Error: cannot extract size for volume $vol"
71 elif [ "$size" -ge $limit ]
74 echo "Error: size ($size) exceeds limit ($limit)"
77 echo "-$size" >>$tmp.
bc
80 cat $tmp.
bc >>$seq.full
82 echo "sum(input data volume sizes) - sum(output data volume sizes)"
83 ( tr '\012' ' ' <$tmp.
bc ; echo ) |
bc
86 echo "Temporal Index Entries ..."
87 for arch
in tmparch
/big1 tmparch
/big2 tmparch
/big3
89 log
=`echo $arch | sed -e 's/tmparch\///g'`
90 echo "$log: `pmdumplog -t $arch | grep '^[0-9]' | wc -l | sed -e 's/ //g'`"