This file is indexed.

/var/lib/pcp/testsuite/274 is in pcp-testsuite 3.9.10.

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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#! /bin/sh
# PCP QA Test No. 274
# Throw a broken PMDA at PCP 2.0 libpcp_pmda and dbpmda
#
# 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_VER -lt 3600 ]
then
    ln $seq.out.1 $seq.out
else
    ln $seq.out.2 $seq.out
fi

status=1
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15

_filter()
{
    # "dbpmda> $" filter for Linux
    sed \
    	-e '/pmResult/s/0x[^ ]*/ADDR/g' \
    	-e '/pmResult/s/amp: 0.000000 .* numpmid:/amp: EPOCH in LOCALTIME numpmid:/' \
	-e 's/\/tmp.*/logfile/g' \
	-e 's/\(broken_pmda_2_[0-9]\)([0-9][0-9]*)/\1(PID)/' \
	-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/ [0-9\.]*e-[0-9]* 0x/ REAL 0x/g' \
	-e 's/ 0 0x/ REAL 0x/g' \
        -e '/dbpmda> $/d' \
	-e '/Error PDU:/s/One-line/Oneline/'

# last sed substitution thanks to pv:937345 which changed the wording
# ... preserving the old form so QA passes
}

_filter2()
{
    sed \
    	-e 's/^\[.*\] broken_pmda_2_.([0-9]*)/broken pmda/g' \
        -e '/Info: direct map  =/d' \
        -e '/Info: metric map  =/d' \
	-e 's/^Log for.*/Log started/g' \
	-e 's/^Log finished.*/Log finished/g'
}

_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/'
}

_filterStartBrokenPMDA25 () {
    #  This filter came about as a result of a different ordering of
    #  output in both stdout and stderr from dbpmda in PCP 2.1. This
    #  filter makes it appear as it would in PCP 2.2 onwards so that
    #  the test can detect changes to the text itself rather than the
    #  position of the line "Start broken_pmda_2_5 PMDA..." in the
    #  output for the dbpmda "open" command.
    $PCP_AWK_PROG '
BEGIN   { found = false }
/Start broken_pmda_2_5 PMDA: / {
            if (found = false) found = $0
            else found = found $0
            next
        }
/dbpmda> / {
            if ( found != false ) {
                print found
                found = false
            }
            print $0
            next
        }
        { print }
'
}


# real QA test starts here
unset ROOT MAKEFLAGS

# Install the PMDA
cd $here/pmdas/broken
$sudo ./broken_Install -N < /dev/null | _filter_ins
cd $here

# Remove the PMDA
_remove()
{
    cd $here/pmdas/broken
    $sudo ./broken_Remove -N
    cd $here
}

trap "_remove; exit \$status" 0 1 2 3 15

dbpmda -ie 2>&1 <<End-of-File | _filter
open pipe pmdas/broken/broken_pmda_2_0 -D47104 -l $tmp.log
status
# Test the valid metrics
fetch broken.valid.one broken.valid.two broken.valid.three
text broken.valid.one
# Test for metric not defined in table but in the PMNS and fetch callback
fetch broken.bogus.one
# Test for metric not defined in table and PMNS but in the fetch callback
fetch broken.bogus.two
# Test for metric defined in table and fetch, but not the pmns
fetch broken.no.pmns
# Test for multiple fetch with an invalid metric between valid metrics
fetch broken.valid.one broken.bogus.one broken.valid.two
# Test for illegal data types
fetch broken.bad.type
# Test for metric with no fetch support
fetch broken.no.fetch
# Test for metric with no help
fetch broken.no.help broken.no.shorthelp broken.no.longhelp
text broken.no.help
text broken.no.shorthelp
text broken.no.longhelp
# Test for handling of bad semantics
fetch broken.bad.semantics
# Test for handling of bad scale
fetch broken.bad.scale
# Test for handling of empty instance lists
fetch broken.no.instances
# Test for handling of missing instances in fetch
fetch broken.no.instfetch
close
quit
End-of-File

sleep 1
[ -f $tmp.log ] && cat $tmp.log | _filter2
rm -f $tmp.log

dbpmda -ie 2>&1 <<End-of-File | _filter
open pipe pmdas/broken/broken_pmda_2_1 -D47104 -l $tmp.log
status
wait 5
fetch broken.bad.indom
close
quit
End-of-File

sleep 1
[ -f $tmp.log ] && cat $tmp.log | _filter2
rm -f $tmp.log

dbpmda -ie 2>&1 <<End-of-File | _filter
open pipe pmdas/broken/broken_pmda_2_2 -D47104 -l $tmp.log
status
close
quit
End-of-File

sleep 1
[ -f $tmp.log ] && cat $tmp.log | _filter2
rm -f $tmp.log

dbpmda -ie 2>&1 <<End-of-File | _filter
open pipe pmdas/broken/broken_pmda_2_3 -D47104 -l $tmp.log
status
close
quit
End-of-File

sleep 1
[ -f $tmp.log ] && cat $tmp.log | _filter2
rm -f $tmp.log

dbpmda -ie 2>&1 <<End-of-File | _filter
open pipe pmdas/broken/broken_pmda_2_4 -D47104 -l $tmp.log
status
text broken.valid.one
close
quit
End-of-File

sleep 1
[ -f $tmp.log ] && cat $tmp.log | _filter2
rm -f $tmp.log

dbpmda -ie 2>&1 <<End-of-File | _filter | _filterStartBrokenPMDA25
open pipe pmdas/broken/broken_pmda_2_5 -D47104 -l $tmp.log
status
text broken.valid.one
close
quit
End-of-File

sleep 1
[ -f $tmp.log ] && cat $tmp.log | _filter2
rm -f $tmp.log

# all done
status=0
exit