/var/lib/pcp/testsuite/779 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 | #!/bin/sh
# PCP QA Test No. 779
# Exercise semantic checks for early use of pmdaConnect() by a PMDA in C
#
# Copyright (c) 2014 Ken McDonell. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
MYPORT=`_get_port tcp 543210 543220`
_filter()
{
sed \
-e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]$/DATE/' \
-e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/DATE/' \
-e 's/badpmda([1-9][0-9]*) /badpmda(PID) /' \
-e "s;$MYPORT;MYPORT;g" \
-e "s;$tmp;TMP;g"
}
status=1 # failure is the default!
$sudo rm -rf $tmp.* $seq.full
trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
# real QA test starts here
echo "open pipe src/badpmda -c 0" \
| dbpmda >$tmp.out 2>$tmp.err
cat $tmp.out $tmp.err | _filter
echo
echo "open pipe src/badpmda -c 1" \
| dbpmda >$tmp.out 2>$tmp.err
cat $tmp.out $tmp.err | _filter
echo
src/badpmda -c 2 -p $MYPORT </dev/null >$tmp.out 2>$tmp.err &
sleep 1
echo "open socket inet $MYPORT" \
| dbpmda >$tmp.out1 2>$tmp.err1
wait
cat $tmp.out $tmp.err | _filter
cat $tmp.out1 $tmp.err1 | _filter
echo
src/badpmda -c 3 -s $tmp.socket </dev/null >$tmp.out 2>$tmp.err &
sleep 1
echo "open socket unix $tmp.socket" \
| dbpmda >$tmp.out1 2>$tmp.err1
wait
cat $tmp.out $tmp.err | _filter
cat $tmp.out1 $tmp.err1 | _filter
# success, all done
status=0
exit
|