docs: tweak formatting in pmrep(1) archive folio example
[pcp.git] / qa / 441
blob554816f6cb7022740342c527ad32a2261f708668
1 #!/bin/sh
2 # PCP QA Test No. 441
3 # check 2^31 volume switching for pmlogger
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
6 # Copyright (c) 2012 Red Hat.
8 # check-group-include: pmlogger
10 seq=`basename $0`
11 echo "QA output created by $seq"
13 # get standard environment, filters and checks
14 . ./common.product
15 . ./common.filter
16 . ./common.check
18 status=0 # success is the default!
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 # real QA test starts here
22 rm -f $seq.full
23 ./tmparch/mkbig1 > $seq.full 2>&1
24 [ $? -eq 0 ] || _notrun `cat $seq.full`
26 # expect 2 volumes, and both < 2^31 bytes in size
28 limit=2147483648
29 nvol=`ls tmparch/big1.? | wc -l | sed -e 's/ //g'`
30 if [ $nvol -ne 2 ]
31 then
32 ls -l tmparch/big1.?
33 echo "Error: expecting 2 volumes, found $nvol"
34 status=1
37 for vol in tmparch/big1.?
39 size=`_filesize $vol`
40 if [ -z "$size" ]
41 then
42 stat $vol
43 echo "Error: cannot extract size for volume $vol"
44 status=1
45 elif [ "$size" -ge $limit ]
46 then
47 ls -l $vol
48 echo "Error: size ($size) exceeds limit ($limit)"
49 status=1
51 done
53 # success, all done
54 exit