qa: revert some change to expected 244 outputs (from pmda-restart)
[pcp.git] / qa / 1049
blob2091e9ce17eca766c78adc43ee56ca5bbb60c0fd
1 #! /bin/sh
2 # PCP QA Test No. 1049 (formerly 552)
3 # make sure that installed pmie rule files are syntactically OK.
5 # Copyright (c) 2015 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
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 [ -f $PCP_PMDAS_DIR/shping/pmdashping ] || _notrun "shping pmda not installed"
18 [ -f $PCP_PMDAS_DIR/cisco/pmdacisco ] || _notrun "cisco pmda not installed"
19 [ -f $PCP_PMDAS_DIR/dm/pmdadm ] || _notrun "dm pmda not installed"
20 which pmieconf >/dev/null 2>&1 || _notrun "No pmieconf binary installed"
22 status=1 # failure is the default!
23 username=`id -u -n`
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 # Some metrics unavailable by default, so skip the associated rules
28 cat >$tmp.cmd <<EOF
29 modify all enabled yes
30 modify shping enabled no
31 modify cisco enabled no
32 modify dmthin enabled no
33 EOF
35 # real QA test starts here
36 echo "running pmieconf with default rules..."
37 ( cat $tmp.cmd; echo quit ) | pmieconf -f $tmp.eek
38 echo "status=$?"
40 echo "running pmie..."
41 pmieargs="-C"
42 id pcp >/dev/null 2>&1 && pmieargs="$pmieargs -U $username"
43 pmie $pmieargs -c $tmp.eek -l $tmp.pmielog
44 echo "status=$?"
45 echo "pmie log file..."
46 cat $tmp.pmielog | _filter_pmie_log
48 echo "--- pmieconf input ---" >$seq.full
49 cat $tmp.cmd >>$seq.full
50 echo "--- pmie input ---" >>$seq.full
51 cat $tmp.eek >>$seq.full
52 echo "--- pmie output ---" >>$seq.full
53 cat $tmp.pmielog >>$seq.full
55 # success, all done
56 status=0
57 exit