summaryrefslogtreecommitdiff
path: root/qa/467
diff options
context:
space:
mode:
Diffstat (limited to 'qa/467')
-rwxr-xr-xqa/46759
1 files changed, 59 insertions, 0 deletions
diff --git a/qa/467 b/qa/467
new file mode 100755
index 0000000..d6ba9b7
--- /dev/null
+++ b/qa/467
@@ -0,0 +1,59 @@
+#!/bin/sh
+# PCP QA Test No. 467
+# Check dynamic metrics work with PMAPI clients - DSO PMDA version
+# pmdumptext test from 210
+#
+# Copyright (c) 2009,2011 Ken McDonell. All Rights Reserved.
+#
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+# get standard environment, filters and checks
+. ./common.product
+. ./common.filter
+. ./common.check
+
+grep -q ' RESERVED_DO_NOT_USE[ ]*511' $PCP_VAR_DIR/pmns/stdpmid || \
+ _notrun "No support for dynamic PMNS entries"
+which pmdumptext >/dev/null 2>&1 || _notrun "pmdumptext not installed"
+
+status=0 # success is the default!
+$sudo rm -rf $tmp.*
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+rm -f $seq.full
+
+_filter_dumptext()
+{
+ _filter_pmdumptext \
+ | sed -e '/^Time[ ]/s/[ ][^:]*:/ HOST:/g' \
+ | $PCP_AWK_PROG '
+NR == 1 { for (i = 1; i <= NF; i++) {
+ if ($i ~ /\.max\.redirect/)
+ state[i] = 0
+ else
+ state[i] = 1
+ }
+ }
+ { for (i = 1; i <= NF; i++) {
+ if (state[i]) printf "%s ",$i
+ }
+ print ""
+ }'
+}
+
+_do() {
+ echo
+ echo "== $* =="
+ pmdumptext -H -s 3 $* | _filter_dumptext
+}
+
+# real QA test starts here
+
+echo "PMNS traversal tests ..."
+pminfo sampledso | grep '\.secret\.' | LC_COLLATE=POSIX sort
+_do sampledso.secret
+_do sampledso.secret.bar sampledso.secret.foo
+_do sampledso.secret.foo.bar.grunt
+
+exit