3 # Exercise the PAPI PMDA Install/Remove process.
5 # Copyright (c) 2014 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 [ -d $PCP_PMDAS_DIR/papi
] || _notrun
"PAPI PMDA is not installed"
18 status
=1 # failure is the default!
19 $sudo rm -rf $tmp.
* $seq.full
20 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
24 # cull message resulting from no papi metrics
25 grep -v 'Missing metric value(s)' | \
26 grep -v 'No value(s) available' | \
27 grep -v 'papi.control.reset: .* not yet .*'
33 echo "=== remove PAPI agent ==="
34 $sudo .
/Remove
>$tmp.out
2>&1
35 _filter_pmda_remove
<$tmp.out
40 # start from known starting points
41 cd $PCP_PMDAS_DIR/papi
42 $sudo .
/Remove
>/dev
/null
2>&1
43 $sudo $PCP_RC_DIR/pmcd stop | _filter_pcp_stop
46 echo "=== PAPI agent installation ==="
47 $sudo .
/Install
</dev
/null
>$tmp.out
2>&1
48 # some warnings are reasonable (e.g., too many concurrent counters)
49 num_metrics
=`$sudo pminfo -f papi.available.num_counters | grep value | awk '{print $2}'`
50 if [ -z "$num_metrics" ] ||
[ "$num_metrics" -eq "0" ]; then
51 _notrun
"PAPI metrics not found on hardware"
53 # Check papi metrics have appeared ... X metrics and Y values
54 _filter_pmda_install
<$tmp.out \
56 -e '/^Waiting for pmcd/s/\.\.\.[. ]*$/DOTS/' \
57 -e 's/[0-9][0-9]* warnings, //' \
59 /Check papi metrics have appeared/ { if ($7 >= 7 && $7 <= 2500) $7 = "X"
60 if ($10 >= 0 && $10 <= 2500) $10 = "Y"
66 trap "_cleanup_pmda papi; exit \$status" 0 1 2 3 15
68 # real QA test starts here
71 # pmcd should have been started by the Install process - check
72 if $sudo pminfo
-v papi
> $tmp.info
2> $tmp.err
76 echo "... failed! ... here is the Install log ..."
79 cat $tmp.info
$tmp.err | _filter_papi