3 # Exercise a couple of perl PMDA module bugs/features.
5 # Copyright (c) 2014-2015 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 perl
-e "use PCP::PMDA" >/dev
/null
2>&1
17 [ $?
-eq 0 ] || _notrun
"perl PCP::PMDA module not installed"
21 if pmprobe
-I pmcd.agent.status |
grep '"test_perl"' >/dev
/null
23 cd $here/pmdas
/test_perl
24 $sudo .
/Remove
>>$here/$seq.full
2>&1
25 $sudo rm -f domain.h.perl
30 status
=1 # failure is the default!
31 $sudo rm -rf $tmp.
* $seq.full
32 trap "cd $here; rm -rf $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
34 # real QA test starts here
36 $sudo .
/Install
</dev
/null \
37 | _filter_pmda_install \
38 |
sed -e '/^Waiting for pmcd/s/\.\.\.[. ]*$/DOTS/' \
40 /Check test_perl metrics have appeared/ { if ($10 >= 0 && $10 <= 5) $10 = "N" }
44 # start from a known place
45 pmstore test_perl.some_value
0 \
46 |
sed -e 's/old value=./old value=N/g'
48 # need a few invocations to tickle the bug
49 for i
in 1 2 3 4 5; do
50 echo "=== Round $i ===" |
tee -a $here/$seq.full
52 test_perl.other_indom.some_value \
53 test_perl.some_value \
54 test_perl.some_indom.some_value