summaryrefslogtreecommitdiff
path: root/qa/721
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/721
downloadpcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/721')
-rwxr-xr-xqa/72158
1 files changed, 58 insertions, 0 deletions
diff --git a/qa/721 b/qa/721
new file mode 100755
index 0000000..3ed5a0e
--- /dev/null
+++ b/qa/721
@@ -0,0 +1,58 @@
+#!/bin/sh
+# PCP QA Test No. 721
+# Exercise the dbpmda connection attribute interface
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+# get standard environment, filters and checks
+. ./common.product
+. ./common.filter
+. ./common.check
+
+[ $PCP_VER -ge 3800 ] || _notrun "Installed dbpmda lacks attribute support"
+
+status=0 # success is the default!
+$sudo rm -rf $tmp.* $seq.full
+trap "rm -f $tmp.* sample.log; exit \$status" 0 1 2 3 15
+
+_filter()
+{
+ sed \
+ -e '/dbpmda([0-9][0-9]*)/s//dbpmda(PID)/' \
+ -e '/pmdasample([0-9][0-9]*)/s//pmdasample(PID)/' \
+ -e 's/^\[[A-Z].. [A-Z].. *[0-9][0-9]* ..:..:..]/[DATETIME]/'
+}
+
+# real QA test starts here
+cd "$PCP_PMDAS_DIR/sample"
+echo .
+
+# pipe PMDA variant of test
+$sudo rm -f sample.log
+$sudo dbpmda -n root -ie <<End-of-File 2>&1 | _filter
+debug AUTH
+open pipe pmdasample -l sample.log -D AUTH
+attr
+attr 5 "pcpqa"
+attr "username" "pcpqa"
+attr 0 "no-such-attr"
+attr "no-such-attr"
+End-of-File
+echo Checking log file, pipe mode
+grep -i attribute sample.log | _filter
+$sudo rm -f sample.log
+echo .
+
+# DSO PMDA variant of test
+$sudo dbpmda -n root -ie <<End-of-File 2>&1 | _filter
+debug AUTH
+open dso pmda_sample.so sample_init
+attr
+attr 5 "pcpqa"
+attr "username" "pcpqa"
+attr 0 "no-such-attr"
+attr "no-such-attr"
+End-of-File
+
+exit 0