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/721 | |
download | pcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/721')
-rwxr-xr-x | qa/721 | 58 |
1 files changed, 58 insertions, 0 deletions
@@ -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 |