3 # Exercise the Unbound PMDA installation and removal.
5 # Copyright (c) 2014 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 test -e $PCP_PMDAS_DIR/unbound || _notrun
"unbound PMDA not installed"
17 if which unbound-control
>/dev
/null
2>&1
21 _notrun
"unbound-control not installed"
24 status
=1 # failure is the default!
25 $sudo rm -rf $tmp.
* $seq.full
30 echo "=== remove unbound agent ==="
31 sudo .
/Remove
>$tmp.out
2>&1
32 _filter_pmda_remove
<$tmp.out
37 # start from known starting points
38 cd $PCP_PMDAS_DIR/unbound
39 $sudo .
/Remove
>/dev
/null
2>&1
42 echo "=== $iam agent installation ==="
43 $sudo .
/Install
</dev
/null
>$tmp.out
2>&1
44 # Check unbound metrics have appeared ... X metrics and Y values
45 _filter_pmda_install
<$tmp.out \
47 -e '/^Waiting for pmcd/s/\.\.\.[. ]*$/DOTS/' \
49 /Check unbound metrics have appeared/ { if ($7 >= 100) $7 = "X"
50 if ($10 >= 100) $10 = "Y"
61 trap "unbound_cleanup; exit \$status" 0 1 2 3 15
65 # filter metric values for deterministic output
66 tee -a $here/$seq.full |
sed \
67 -e 's/value [0-9][0-9]*/value NUMBER/'
70 # real QA test starts here
73 # pmdaunbound should have been started by the Install process - check
74 if pminfo
-v unbound
> $tmp.info
2> $tmp.err
78 echo "... failed! ... here is the Install log ..."
81 cat $tmp.info
$tmp.err | _filter_unbound
83 # Check that the correct metrics are present