3 # Derived metrics and PM_TYPE_EVENT
5 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
19 -e 's/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g'
22 status
=0 # success is the default!
23 $sudo rm -rf $tmp.
* $seq.full
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 # real QA test starts here
27 echo "=== This should work ==="
28 pmstore sample.event.
reset 0 >/dev
/null
2>&1
29 echo "myevents = sample.event.records" >$tmp.config
30 pminfo
-c $tmp.config
-f myevents | _filter
31 pminfo
-c $tmp.config
-f myevents | _filter
32 pminfo
-c $tmp.config
-f myevents | _filter
33 pminfo
-c $tmp.config
-f myevents | _filter
36 echo "=== These should NOT work ==="
37 echo "my.bad_1 = sample.event.records - sample.event.records" >$tmp.config
38 echo "my.bad_2 = 1 + sample.event.records" >>$tmp.config
39 echo "my.bad_3 = (sample.event.reset + 1) + sample.event.records" >>$tmp.config
40 echo "my.bad_4 = sample.event.records - (sample.event.reset + 1)" >>$tmp.config
41 echo "my.bad_5 = sample.event.reset + (1 + sample.event.records)" >>$tmp.config
42 echo "my.bad_6 = sample.event.reset + (sample.event.records * 2)" >>$tmp.config
43 pminfo
-c $tmp.config
-f my