/var/lib/pcp/testsuite/1047 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 | #! /bin/sh
# PCP QA Test No. 1047 (formerly 528)
# rules file syntax parsing & value/type checking
#
# 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
which pmieconf >/dev/null 2>&1 || _notrun "No pmieconf binary installed"
status=1 # failure is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
cat > $tmp.pmie <<EOF
// pmieconf-pmie 1 $tmp.test
// end
EOF
cat > $tmp.rules <<EOF
#pmieconf-rules 1
EOF
_run_pmieconf()
{
pmieconf -f $tmp.pmie -r $tmp.test list all >$tmp.out 2>&1
pstatus=$?
sed -e "s/$seq-$$/[SEQ-PID]/g" $tmp.out
echo status=$pstatus
}
# real QA test starts here
echo
echo "=== basic sanity check (pmieconf should fail with no rules)"
cat $tmp.rules - > $tmp.test <<EOF
string global.foo
default = 100;
EOF
_run_pmieconf
echo
echo "=== non-existant type"
cat $tmp.rules - > $tmp.test <<EOF
foo global.bloo
default = moo;
EOF
_run_pmieconf
echo
echo "=== 5 bad rulefile syntax tests"
cat $tmp.rules - > $tmp.test <<EOF
string global.bloo
default moo;
EOF
_run_pmieconf
cat $tmp.rules - > $tmp.test <<EOF
= global.bloo
default = "";
EOF
_run_pmieconf
cat $tmp.rules - > $tmp.test <<EOF
percent global.bloo
sometext = blat;
EOF
_run_pmieconf
cat $tmp.rules - > $tmp.test <<EOF
percent global.joe enabled = yes
EOF
_run_pmieconf
cat $tmp.rules - > $tmp.test <<EOF
string bloo
default "missing rule";
EOF
_run_pmieconf
# success, all done
status=0
exit
|