zsh completions: minor tweaks
[pcp.git] / qa / 286
blob6d3c55dfe8cc5a3ed21bf8c044838a61bfbe62f6
1 #!/bin/sh
2 # PCP QA Test No. 286
3 # exercise local context kernel pmda metrics
4 # (fetch and instance PDUs). See RH BZ 858384.
6 # Copyright (c) 2012 Red Hat.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 status=1 # failure is the default!
18 $sudo rm -rf $tmp.* $seq.full
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 # real QA test starts here
22 rm -f $seq.full
24 # iterate over local context (dso) kernel pmda metrics,
25 # checking each one with different PDU orderings.
27 pminfo -L kernel hinv 2>/dev/null |
28 while read metric
30 echo checking metric: $metric >> $seq.full
32 # check fetch (eg. RH BZ 858384)
33 pmval -s 1 @:$metric >> $seq.full
34 [ $? -ne 0 ] && echo "$metric failed (pmval)"
36 # check instance identifiers (only, no fetch)
37 pmprobe -L -i $metric >> $seq.full
38 [ $? -ne 0 ] && echo "$metric failed (pmprobe)"
39 done
41 # success, all done
42 status=0
43 exit