/var/lib/pcp/testsuite/102 is in pcp-testsuite 3.8.12ubuntu1.
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 128 129 130 131 132 133 134 135 136 137 138 | #! /bin/sh
# PCP QA Test No. 102
# pmlc parser/scanner/error handling
#
# 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
_cleanup()
{
_restore_primary_logger
$sudo rm -f $tmp $tmp.*
exit $status
}
status=1
rm -f $seq.full
trap "_cleanup" 0 1 2 3 15
_filter_pmlc()
{
# error message mapping is due to differences between IRIX and Linux
#
sed \
-e 's/connect [0-9][0-9]*/connect PID/' \
-e 's/Version [0-9].*/Version VERSION/' \
-e 's/^parse error/Syntax error/' \
-e 's/line [0-9]*/line NUM/g' \
-e 's/^syntax error/Syntax error/' \
-e 's/^Reason: Unknown or illegal.*$/Reason: No PMCD agent for domain of request/'
}
signal=$PCP_BINADM_DIR/pmsignal
# real QA test starts here
_writable_primary_logger
$sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
_wait_for_pmcd
_wait_for_pmlogger
pmlc -ie <<End-of-File >$tmp.out 2>$tmp.err
# not connected
query sample.drift
advisory on 1 hour sample.drift
connect primary
# incomplete - syntax error
query sample.bin [
query {
sample.drift
# eat input
# up to
# next } -- curly brace
}
query {
barf.no.metric
# suck to } ... not that one, this one ..
}
End-of-File
_filter_pmlc <$tmp.err
_filter_pmlc <$tmp.out
for delta in "-1 msec" "75 hours" "599 hours" "1200 hours"
do
$sudo rm -f $tmp.*
cat <<End-of-File >$tmp.config
log advisory on $delta sample.bin [100]
End-of-File
# pmlogger -c $tmp.config -T 4 $tmp
$sudo rm -f $tmp.*
_start_up_pmlogger -L -c /dev/null -l $tmp.log -T 4 $tmp
pmsleep 0.5
pmlc -ie <<End-of-File >$tmp.out 2>$tmp.err
connect $pid
log advisory on $delta sample.bin [100]
End-of-File
_filter_pmlc <$tmp.err
_filter_pmlc <$tmp.out
$sudo $signal -s TERM $pid
_wait_pmlogger_end $pid
_filter_pmlogger_log <$tmp.log
done
pmsleep 0.5
pmlc -ie <<End-of-File >$tmp.out 2>$tmp.err
connect primary
log mandatory on 1 hour { sample.bin, sample.drift, sample.seconds }
query sample.bin[333]
End-of-File
_filter_pmlc <$tmp.err
_filter_pmlc <$tmp.out
$sudo $signal -a pmdasample
pmsleep 0.5 # time to cleanup
pminfo -f sample >/dev/null 2>&1 # and make sure pmcd notices
pmlc -ie <<End-of-File >$tmp.out 2>$tmp.err
connect primary
query sample.bin[100]
query sample.bin[100]
End-of-File
_filter_pmlc <$tmp.err
_filter_pmlc <$tmp.out
$sudo $signal -a -s HUP pmcd
pmsleep 0.5 # time to cleanup
pmlc -ie <<End-of-File >$tmp.out 2>$tmp.err
connect primary
query sample.bin[100]
query { sample.bin,sample.drift sample.seconds }
query { sample.bin sample.drift,sample.seconds }
query sample.bin [100,200,300 400 500,700]
query sample.bin [100,"bin-200"]
End-of-File
_filter_pmlc <$tmp.err
_filter_pmlc <$tmp.out
pmlc -ie <<End-of-File >$tmp.out 2>$tmp.err
connect primary
log mandatory maybe {
sample.bin
sample.drift, sample.seconds
}
End-of-File
_filter_pmlc <$tmp.err
_filter_pmlc <$tmp.out
status=0
exit
|