Drop unused condition check
[pcp.git] / qa / 721
blob940005df14777e9eeb6a5c8a6ddb23327c147e68
1 #!/bin/sh
2 # PCP QA Test No. 721
3 # Exercise the dbpmda connection attribute interface
5 seq=`basename $0`
6 echo "QA output created by $seq"
8 # get standard environment, filters and checks
9 . ./common.product
10 . ./common.filter
11 . ./common.check
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
19 _filter()
21 tee -a $here/$seq.full \
22 | sed \
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" \
27 # end
30 # real QA test starts here
31 cd "$PCP_PMDAS_DIR/sample"
32 echo .
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
38 debug AUTH
39 open pipe pmdasample -l sample.log -D AUTH
40 attr
41 attr 5 "pcpqa"
42 attr "username" "pcpqa"
43 attr 0 "no-such-attr"
44 attr "no-such-attr"
45 End-of-File
47 # need to pause here to make sure pmdasample has seen the pipe close,
48 # and flushed the log before exiting
50 sleep 2
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
56 echo .
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
61 debug AUTH
62 open dso pmda_sample.$DSO_SUFFIX sample_init
63 attr
64 attr 5 "pcpqa"
65 attr "username" "pcpqa"
66 attr 0 "no-such-attr"
67 attr "no-such-attr"
68 End-of-File
70 exit 0