3 # Testing MMV client flags behaviour
5 # Copyright (c) 2010 Aconex. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
18 MMV_STATS_DIR
="$PCP_TMP_DIR/mmv"
20 # for QA the default install for mmv PMDA is as a dso, not a daemon
21 ( echo b
&& echo dso
) >$tmp.input
25 [ -d $MMV_STATS_DIR.
$seq ] && _restore_config
$MMV_STATS_DIR
26 _cleanup_pmda mmv
$tmp.input
30 trap "_cleanup; exit \$status" 0 1 2 3 15
35 -e '/^mmv.test.interval/d' \
36 -e '/^mmv.interval/d' \
46 # move the MMV directory to restore contents later.
47 [ -d $MMV_STATS_DIR ] && _save_config
$MMV_STATS_DIR
49 # start from a known starting point
50 $sudo .
/Remove
>/dev
/null
2>&1
52 # create a directory we can write and pcp group can read
53 $sudo rm -rf "$MMV_STATS_DIR"
54 $sudo mkdir
-m 755 "$MMV_STATS_DIR"
55 $sudo chown
$username "$MMV_STATS_DIR"
56 $sudo chgrp pcp
"$MMV_STATS_DIR"
59 echo "=== $iam agent installation ==="
60 $sudo .
/Install
</dev
/null
>$tmp.out
2>&1
61 _filter_pmda_install
<$tmp.out
63 $here/src
/mmv_genstats
66 echo "=== Listing with a valid process and with prefix ==="
67 $here/src
/mmv_poke
-p $$
-f process
"$MMV_STATS_DIR/test"
68 pmprobe
-v mmv | _filter
70 echo "=== Listing with a valid process and without prefix ==="
71 $here/src
/mmv_poke
-p $$
-f noprefix
"$MMV_STATS_DIR/test"
72 pmprobe
-v mmv | _filter
74 echo "=== Listing with a valid process and sentinel flag set ==="
75 $here/src
/mmv_poke
-p $$
-f sentinel
"$MMV_STATS_DIR/test"
76 pmprobe
-v mmv | _filter
78 echo "=== Listing without a valid process ==="
79 $here/src
/mmv_poke
-p 4294967295 -f process
"$MMV_STATS_DIR/test"
80 pmprobe
-v mmv | _filter
83 echo "=== remove $iam agent ==="
84 $sudo .
/Remove
>$tmp.out
2>&1
85 _filter_pmda_remove
<$tmp.out
88 echo "=== $iam agent re-installation ==="
89 $sudo .
/Install
<$tmp.input
>$tmp.out
2>&1
90 _filter_pmda_install
<$tmp.out