diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/468 | |
download | pcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/468')
-rwxr-xr-x | qa/468 | 59 |
1 files changed, 59 insertions, 0 deletions
@@ -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 |