Drop unused condition check
[pcp.git] / qa / 479
blobdd2da43cf2e49be3b4e7dda3c24c72c7d86ca849
1 #!/bin/sh
2 # PCP QA Test No. 479
3 # coverage for libpcp/logmeta.c
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=0 # success is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 mkdir $tmp
19 trap "rm -rf $tmp; exit \$status" 0 1 2 3 15
21 _filter()
23 sed \
24 -e "s;$tmp;TMP;g" \
25 -e '/addindom( /s/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/' \
26 -e '/searchindom( /s/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/'
29 _filter2()
31 _filter_pmie_log \
32 | sed -e '/Info: evaluator exiting/d' \
33 | _filter
36 cp archives/bozo.client_v2.* $tmp
37 mv $tmp/bozo.client_v2.meta $tmp/bozo.client_v2.save
39 # real QA test starts here
40 for bad in $tmp/bozo.client_v2.meta.bad.*
42 echo
43 echo "=== bad #`echo $bad | sed -e 's/.*\.bad\.//'` ==="
44 cp $bad $tmp/bozo.client_v2.meta
45 pmdumplog -z -a -Dlogmeta $tmp/bozo.client_v2 2>&1 \
46 | _filter
47 done
49 for size in 100 132 136 160 164 407 440 512
51 echo
52 echo "=== size $size ==="
53 dd if=$tmp/bozo.client_v2.save bs=1 count=$size of=$tmp/bozo.client_v2.meta >/dev/null 2>&1
54 pmdumplog -z -a -Dlogmeta $tmp/bozo.client_v2 2>&1 \
55 | _filter
56 done
58 echo
59 echo "torture_indom ... silence is golden"
60 src/torture_indom -a archives/ace_v2 disk.dev.total
62 echo
63 echo "pmie archive meta data exercises ..."
64 echo 'some_inst disk.dev.total > 0 -> print "active disks:" " %i"' \
65 | pmie -z -t 2sec -a archives/ace_v2 2>&1 \
66 | _filter2
67 echo
68 echo 'some_inst disk.dev.total #dks1d1 #dks1d7 > 0 -> print "active disks: " "%i"' \
69 | pmie -Dlogmeta -z -t 2sec -a archives/ace_v2 2>&1 \
70 | _filter2
72 echo
73 echo "pmval archive meta data exercises ..."
74 pmval -z -t 5sec -Dlogmeta -a archives/ac15 kernel.all.load 2>&1 | _filter
75 echo
76 pmval -z -t 5sec -Dlogmeta -a archives/ac15 -i '"15 minute","5","1 minute"' kernel.all.load 2>&1 | _filter
78 echo
79 echo "torture ..."
80 src/torture_logmeta -Dlogmeta archives/ac15 60 2 123 2>&1 \
81 | tee -a $seq.full \
82 | _filter
84 # success, all done
85 exit