3 # Exercise the dbpmda connection attribute interface
6 echo "QA output created by $seq"
8 # get standard environment, filters and checks
13 [ -d $PCP_PMDAS_DIR/sample
] || _notrun
"sample PMDA directory is not installed"
15 status
=0 # success is the default!
16 $sudo rm -rf $tmp.
* $seq.full
17 trap "rm -f $tmp.* sample.log; exit \$status" 0 1 2 3 15
21 tee -a $here/$seq.full \
23 -e '/dbpmda([0-9][0-9]*)/s//dbpmda(PID)/' \
24 -e '/pmdasample([0-9][0-9]*)/s//pmdasample(PID)/' \
25 -e 's/^\[[A-Z].. [A-Z].. *[0-9][0-9]* ..:..:..]/[DATETIME]/' \
26 -e "s/\.$DSO_SUFFIX /.DSO /g" \
30 # real QA test starts here
31 cd "$PCP_PMDAS_DIR/sample"
34 # pipe PMDA variant of test
35 echo "=== pipe PMDA ===" >>$here/$seq.full
36 $sudo rm -f sample.log
37 $sudo TERM
=ansi dbpmda
-n root
-ie <<End-of-File 2>&1 | _filter
39 open pipe pmdasample -l sample.log -D AUTH
42 attr "username" "pcpqa"
47 # need to pause here to make sure pmdasample has seen the pipe close,
48 # and flushed the log before exiting
52 echo Checking log
file, pipe mode |
tee -a $here/$seq.full
53 cat sample.log
>>$here/$seq.full
54 grep -i attribute sample.log | _filter
55 $sudo rm -f sample.log
58 # DSO PMDA variant of test
59 echo "=== DSO PMDA ===" >>$here/$seq.full
60 $sudo TERM
=ansi dbpmda
-n root
-ie <<End-of-File 2>&1 | _filter
62 open dso pmda_sample.$DSO_SUFFIX sample_init
65 attr "username" "pcpqa"