summaryrefslogtreecommitdiff
path: root/qa/468
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
commit47e6e7c84f008a53061e661f31ae96629bc694ef (patch)
tree648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/468
downloadpcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/468')
-rwxr-xr-xqa/46859
1 files changed, 59 insertions, 0 deletions
diff --git a/qa/468 b/qa/468
new file mode 100755
index 0000000..57fa85c
--- /dev/null
+++ b/qa/468
@@ -0,0 +1,59 @@
+#!/bin/sh
+# PCP QA Test No. 468
+# Check dynamic metrics work with PMAPI clients - DAEMON PMDA version
+# pmdumptext test from 211
+#
+# 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 sample | grep '\.secret\.' | LC_COLLATE=POSIX sort
+_do sample.secret
+_do sample.secret.bar sample.secret.foo
+_do sample.secret.foo.bar.grunt
+
+exit