/var/lib/pcp/testsuite/024 is in pcp-testsuite 4.0.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | #! /bin/sh
# PCP QA Test No. 024
# juggling with contexts, including the default one
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard filters
. ./common.product
. ./common.filter
. ./common.check
PMCD_CONNECT_TIMEOUT=120
PMCD_REQUEST_TIMEOUT=120
export PMCD_CONNECT_TIMEOUT PMCD_REQUEST_TIMEOUT
_filter()
{
# unfortunatley, -D16 maps to an internal debug flag for some PMDAs
# for nodes et al
# filter for __pmDecodeXtendError diag because datum is not
# invariant
#
sed \
-e '/using .* kmem interface/d' \
-e 's/localhost/<&>/' \
-e "s/`hostname`\([):]\)/<localhost>\1/" \
-e "s/$remote\([):]\)/<remotehost>\1/" \
-e 's/fd=[0-9][0-9]*/fd=<n>/g' \
-e 's/features=[0-9][0-9]*/features=<n>/g' \
-e 's/port=[0-9][0-9]*/port=<n>/g' \
-e 's/handle=0x0/handle=(nil)/' \
-e '/ Debug: reload_nodes: /d'\
-e '/ Debug: reload_nodeinfo: /d'\
-e '/ Debug: node_init: /d' \
-e '/ Debug: reload_hubs: /d' \
-e '/ Debug: handle_entry: /d' \
-e '/^__pmDecodeXtendError: got error PDU/s/datum=[0-9][0-9]*/datum=DATA/' \
-e '/^pmWhichContext() -> /d' \
-e '/__pmSendCreds: #0/s/= 201/= 1020000/' \
-e '/^__pmDataIPC: /d' \
-e '/^__pmSetSocketIPC: fd/d' \
-e '/^IPC table fd/d' \
-e '/^__pmSetDataIPC/{
N
d
}' \
-e 's/ [0-9][0-9]*(?)//g' \
-e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;" \
-e "s/$DSO_SUFFIX\([ ,]\)/\$DSO_SUFFIX\1/" \
-e '/IPC table/{
s/ [0-9][0-9]*(?)//g
s/ [0-9][0-9]*(2)/ <n>(2)/g
s/ [0-9][0-9]*(2,1)/ <n>(2,1)/g
}' \
-e 's/^\[[0-9][0-9]*]/[N]/' \
-e "s;\([/_]\)linux/;/\1OS/;" \
-e "s;\([/_]\)darwin/;/\1OS/;" \
-e "s;\([/_]\)solaris/;/\1OS/;" \
-e "s;\([/_]\)windows/;/\1OS/;" \
-e "/jbd2/d" \
-e '/^0*x*[0-9a-f][0-9a-f]* /{
s//ADDR /
s/\[[0-9][0-9]*]/[N]/
s;=[0-9].*/OS/.*;=N name=OS_PMDA, ...;
}' \
-e '/^\[N] .*\/OS\//s/.*/[N] domain=N, name=OS_PMDA, .../' \
-e '/^__pmLocalPMDA(.*\/OS\//{
s/name=.*/name=OS_PMDA, ...)/
s/domain=[0-9][0-9]*/domain=N/
}' \
-e '/__pmConnect(fd=<n>(nsprFd=/d' \
-e '/^NotifyEndLocalContext:/{
/pmda_linux/d
}' \
# end
}
# some non-derminism after the build_dsotable lines for __pmSetSocketIPC and
# IPC table, hence skip these in this context
#
_filter2()
{
$PCP_AWK_PROG '
/build_dsotab:/ { strip=1; print; print "<stripped lines>"; next }
strip == 1 && /pmSetSocketIPC/ { next }
strip == 1 && /IPC table/ { next }
strip == 1 && /pmNewContext/ { strip=0 }
strip == 1 { print >"'$tmp.tmp'"; next }
{ print }'
}
trap "$sudo rm -f $tmp.*; exit" 0 1 2 3 15
$sudo rm -rf $tmp.* $seq.full
remote=`./getpmcdhosts -L -n 1 -a sample 2>$tmp.out`
[ -z "$remote" ] && _notrun `cat $tmp.out`
# real QA test starts here
echo "=== expected to pass ==="
src/chkctx2 -D16 2>&1 | _filter
echo ""
src/chkctx2 -D16 -h localhost 2>&1 | _filter
echo ""
src/chkctx2 -D16 -h `hostname` 2>&1 | _filter
echo ""
src/chkctx2 -D16 -h $remote 2>&1 | _filter
echo ""
PCP_LITE_SAMPLE=yes
export PCP_LITE_SAMPLE
echo | tee -a $seq.full
echo "=== try CONTEXT_LOCAL ===" | tee -a $seq.full
$sudo_local_ctx src/chkctx2_lite -D16 -L 2>&1 \
| tee -a $seq.full \
| _filter \
| _filter2 \
| _filter_pmcd_log
echo
echo "sorted stripped lines ..."
LC_COLLATE=POSIX sort $tmp.tmp | uniq
|