3 # juggling with contexts, including the default one
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
16 PMCD_CONNECT_TIMEOUT
=120
17 PMCD_REQUEST_TIMEOUT
=120
18 export PMCD_CONNECT_TIMEOUT PMCD_REQUEST_TIMEOUT
22 # unfortunatley, -D16 maps to an internal debug flag for some PMDAs
24 # filter for __pmDecodeXtendError diag because datum is not
28 -e '/using .* kmem interface/d' \
29 -e 's/localhost/<&>/' \
30 -e "s/`hostname`\([):]\)/<localhost>\1/" \
31 -e "s/$remote\([):]\)/<remotehost>\1/" \
32 -e 's/fd=[0-9][0-9]*/fd=<n>/g' \
33 -e 's/port=[0-9][0-9]*/port=<n>/g' \
34 -e 's/handle=0x0/handle=(nil)/' \
35 -e '/ Debug: reload_nodes: /d'\
36 -e '/ Debug: reload_nodeinfo: /d'\
37 -e '/ Debug: node_init: /d' \
38 -e '/ Debug: reload_hubs: /d' \
39 -e '/ Debug: handle_entry: /d' \
40 -e '/^__pmDecodeXtendError: got error PDU/s/datum=[0-9][0-9]*/datum=DATA/' \
41 -e '/^pmWhichContext() -> /d' \
42 -e '/__pmSendCreds: #0/s/= 201/= 1020000/' \
43 -e '/^__pmDataIPC: /d' \
44 -e '/^__pmSetSocketIPC: fd/d' \
45 -e '/^IPC table fd/d' \
46 -e '/^__pmSetDataIPC/{
50 -e 's/ [0-9][0-9]*(?)//g' \
51 -e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;" \
52 -e "s/$DSO_SUFFIX\([ ,]\)/\$DSO_SUFFIX\1/" \
55 s/ [0-9][0-9]*(2)/ <n>(2)/g
56 s/ [0-9][0-9]*(2,1)/ <n>(2,1)/g
58 -e 's/^\[[0-9][0-9]*]/[N]/' \
59 -e "s;\([/_]\)linux/;/\1OS/;" \
60 -e "s;\([/_]\)darwin/;/\1OS/;" \
61 -e "s;\([/_]\)solaris/;/\1OS/;" \
62 -e "s;\([/_]\)windows/;/\1OS/;" \
64 -e '/^0*x*[0-9a-f][0-9a-f]* /{
67 s;=[0-9].*/OS/.*;=N name=OS_PMDA, ...;
69 -e '/^\[N] .*\/OS\//s/.*/[N] domain=N, name=OS_PMDA, .../' \
70 -e '/^__pmLocalPMDA(.*\/OS\//{
71 s/name=.*/name=OS_PMDA, ...)/
72 s/domain=[0-9][0-9]*/domain=N/
74 -e '/__pmConnect(fd=<n>(nsprFd=/d' \
75 -e '/^NotifyEndLocalContext:/{
82 # some non-derminism after the build_dsotable lines for __pmSetSocketIPC and
83 # IPC table, hence skip these in this context
88 /build_dsotab:/ { strip=1; print; print "<stripped lines>"; next }
89 strip == 1 && /pmSetSocketIPC/ { next }
90 strip == 1 && /IPC table/ { next }
91 strip == 1 && /pmNewContext/ { strip=0 }
92 strip == 1 { print >"'$tmp.tmp
'"; next }
96 trap "rm -f $tmp.*; exit" 0 1 2 3 15
97 $sudo rm -rf $tmp.
* $seq.full
99 remote
=`./getpmcdhosts -L -n 1 -a sample 2>$tmp.out`
100 [ -z "$remote" ] && _notrun
`cat $tmp.out`
102 # real QA test starts here
103 echo "=== expected to pass ==="
104 src
/chkctx2
-D16 2>&1 | _filter
106 src
/chkctx2
-D16 -h localhost
2>&1 | _filter
108 src
/chkctx2
-D16 -h `hostname` 2>&1 | _filter
110 src
/chkctx2
-D16 -h $remote 2>&1 | _filter
114 export PCP_LITE_SAMPLE
116 echo |
tee -a $seq.full
117 echo "=== try CONTEXT_LOCAL ===" |
tee -a $seq.full
118 $sudo src
/chkctx2_lite
-D16 -L 2>&1 \
125 echo "sorted stripped lines ..."
126 LC_COLLATE
=POSIX
sort $tmp.tmp |
uniq