/var/lib/pcp/testsuite/174 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 | #! /bin/sh
# PCP QA Test No. 174
# validate profile cacheing in dbpmda matches that in libpcp
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
sampledso=$PCP_PMDAS_DIR/sample/pmda_sample.$DSO_SUFFIX
username=`id -u -n`
pipeargs=""
id pcp >/dev/null 2>&1 && pipeargs="-U $username"
_filter()
{
sed \
-e '/pmResult/s/ 0x.* numpmid/ ... numpmid/' \
-e '/^dbpmda> $/d' \
-e "s/ -U $username//g" \
-e "s;$sampledso;SAMPLEDSO;g" \
-e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;g" \
-e "s@$tmp@TMP@g" \
# end
}
# filter out GetPDUs and pmResult dumps
_filter_stderr()
{
# strange sed's are for endian differences in hex dumps
#
sed \
-e 's/ fd=[0-9][0-9]*/ fd=<n>/g' \
-e '/pmResult/,/numval: /d' \
-e '/ inst /d' \
-e '/ value /d' \
-e 's/^\[[0-9][0-9]*]/[PID]/' \
-e '/^000:/s/ 700\(.\) ......../ 700\1 XPID/' \
-e 's/ 1000000 201/ 1 1020000/' \
-e 's/ 1000000 6004007/ 1 7400006/' \
-e 's/ 1000000 1000000/ 1 1/' \
-e 's/ 1000000 2000000/ 1 2/' \
-e 's/ c8000000 90010000/ c8 190/' \
-e 's/ 0 c8000000/ 0 c8/' \
-e 's/ XPID 6004007/ XPID 7400006/' \
-e 's/ 1000000 0 2004007/ 1 0 7400002/' \
-e '/\(DSO init .*->\)0x[0-9a-f]*()/s//\1VADDR()/' \
-e '/DSO init .*->/s/pmda_interface=0x[0-9a-f][0-9a-f]*/pmda_interface=0xXXXX/' \
-e '/DSO has domain/s/pmda_interface=[5-9]/pmda_interface=X/' |
$PCP_AWK_PROG '
/pmGetPDU/ { gotGetPDU=1; next }
gotGetPDU==1 && $1 ~ /[0-9][0-9][0-9]:/ { next }
{ gotGetPDU=0; print }'
}
status=1
trap "$sudo rm -f $tmp.*; exit \$status" 0 1 2 3 15
$sudo rm -f $here/$seq.full
# real QA test starts here
dbpmda -ie <<End-of-File 2>$tmp.err >$tmp.out
debug 1
getdesc on
open pipe $PCP_PMDAS_DIR/sample/pmdasample $pipeargs -d 29 -l $tmp.log
fetch 29.0.6
fetch 29.0.6
fetch 29.0.6
profile 29.2 none
profile 29.2 add 200
fetch 29.0.6
fetch 29.0.6
fetch 29.0.6
profile 29.2 add 400
fetch 29.0.6
fetch 29.0.6
fetch 29.0.6
open dso $sampledso sample_init 30
fetch 30.0.6
fetch 30.0.6
fetch 30.0.6
profile 30.2 none
profile 30.2 add 100
fetch 30.0.6
fetch 30.0.6
fetch 30.0.6
profile 30.2 add 300
fetch 30.0.6
fetch 30.0.6
fetch 30.0.6
End-of-File
cat $tmp.out >>$here/$seq.full
_filter <$tmp.out
echo | tee -a $here/$seq.full
echo "PDUs sent ..." | tee -a $here/$seq.full
cat $tmp.err >>$here/$seq.full
_filter_stderr <$tmp.err
cat $tmp.log >>$here/$seq.full
status=0
exit
|