/var/lib/pcp/testsuite/162 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 | #! /bin/sh
# PCP QA Test No. 162
# namespace only Install/Remove for pmdas
#
# this is less important for PCP 2.0 than it was for PCP 1.x, but we
# need to make sure the functionality still works, e.g. upgrade a
# collector to PCP 2.0, but want to monitor from a PCP 1.x system
#
# Note: expect some "Cannot create" errors from the installation
# of the pmchart view(s) ... we do not run Install/Remove as root
# in this test
#
# See also 600. This version is for the PMDAs in pcp_opensrc.
#
# 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
perl -e "use PCP::PMDA" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "perl PCP::PMDA module not installed"
trap "rm -rf $tmp; exit" 0 1 2 3 15
rm -f $seq.out
if [ $PCP_VER -ge 3600 ]
then
ln $seq.out.5 $seq.out
elif [ $PCP_VER -ge 2402 ]
then
ln $seq.out.4 $seq.out
elif [ $PCP_VER -ge 2300 ]
then
ln $seq.out.3 $seq.out
elif [ $PCP_PLATFORM = linux -o \( $PCP_PLATFORM = irix -a $PCP_VER -ge 2200 \) ]
then
ln $seq.out.2 $seq.out
else
ln $seq.out.1 $seq.out
fi
#
# Get rid of some new sample metrics which
# would make the test vary.
#
_filter()
{
sed \
-e '/sample\.dynamic\.meta/d' \
-e '/sample\.datasize/d' \
-e '/sample\.darkness/d' \
}
_filter_ins()
{
sed \
-e 's/.* \(hash table entries\)/ NNN \1/' \
-e 's/.* \(non-leaf nodes\)/ NNN \1/' \
-e 's/.* \(leaf nodes\)/ NNN \1/' \
-e 's/.* \(bytes of symbol table\)/ NNN \1/' \
-e 's/ *- Permission denied/\
Permission denied/'
}
# all of the ones we ship as part of the PCP product
#
PMDALIST='
cisco
mailq
news
sample
sendmail
simple
summary
trace
trivial
txmon'
# real QA test starts here
unset ROOT MAKEFLAGS
mkdir $tmp
cat >>$tmp/root.orig <<End-of-File
root {
}
End-of-File
cp $tmp/root.orig $tmp/root
for pmda in $PMDALIST
do
instdir=$PCP_PMDAS_DIR/$pmda
echo
echo "=== Install -n for $pmda ==="
if [ -f $instdir/Install ]
then
cd $instdir
$sudo ./Install -e -n $tmp/root -N </dev/null 2>&1 | _filter_ins
pminfo -n $tmp/root $pmda | _filter | LC_COLLATE=POSIX sort
else
echo "Error: $instdir/Install does not exist"
fi
done
echo
echo 'Removals ... expect "Unknown metric name" errors at the end of each'
echo 'operation as the PMNS should have been culled'
for pmda in $PMDALIST
do
instdir=$PCP_PMDAS_DIR/$pmda
echo
echo "=== Remove -n for $pmda ==="
if [ -f $instdir/Remove ]
then
cd $instdir
$sudo ./Remove -n $tmp/root -N
pminfo -n $tmp/root $pmda
else
echo "Error: $instdir/Install does not exist"
fi
done
echo
echo "=== Check final state of root ==="
echo "(expect no diffs between the initial and final PMNS)"
diff -c $tmp/root.orig $tmp/root
exit 0
|