/var/lib/pcp/testsuite/012 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 | #! /bin/sh
# PCP QA Test No. 012
# exercise pmOpenLog
#
# 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
rm -f $seq.out
if [ $PCP_PLATFORM = linux ]
then
ln $seq.linux $seq.out || exit 1
elif [ $PCP_PLATFORM = darwin ]
then
ln $seq.darwin $seq.out || exit 1
elif [ $PCP_PLATFORM = solaris ]
then
ln $seq.solaris $seq.out || exit 1
else
_notrun "Need qualified output for $PCP_PLATFORM"
fi
trap "cd $here; rm -rf $tmp $tmp.* /tmp/chk.fout; exit" 0 1 2 3 15
$sudo rm -rf $tmp $tmp.*
mkdir $tmp
cd $tmp
_doit()
{
echo
echo "--- fd=$fd ---"
$sudo rm -f /tmp/chk.fout
$here/src/chkopenlog $fd tmp.log >$tmp.1 2>$tmp.2
echo "stdout:" ; sed -f $tmp.sed $tmp.1
echo "stderr:" ; sed -f $tmp.sed $tmp.2
echo "log file:" ; sed -f $tmp.sed tmp.log
[ -f /tmp/chk.fout ] && ( echo "chk.fout:" ; sed -f $tmp.sed /tmp/chk.fout )
}
# real QA test starts here
cat <<End-of-File >$tmp.sed
s/`hostname`/MYHOST/g
s/$$/MYPID/g
s/ started .*/ started .../
s/ finished .*/ finished .../
End-of-File
echo "Case 1: should be error-free ..."
for fd in 1 2 3
do
_doit
done
echo
echo "Case 2: pmOpenLog expected to have problems ..."
for fd in 1 2 3
do
echo "THIS SHOULD NOT BE OVERWRITTEN" >tmp.log
chmod ugo-w tmp.log
chmod ugo-w .
_doit
chmod ugo+w .
rm -rf tmp.log
done
|