This file is indexed.

/var/lib/pcp/testsuite/1000 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
72
73
74
75
76
77
#!/bin/sh
# PCP QA Test No. 1000
# pmdumptext segv
# https://bugzilla.redhat.com/show_bug.cgi?id=1131779
#
# 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

which pmdumptext >/dev/null 2>&1 || _notrun "pmdumptext not installed"
numval=`pmprobe -v mem.util.used | cut -d ' ' -f 2`
[ "$numval" -eq 1 ] || _notrun "no values for mem.util.used (numval=$numval)"

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

# filter ...
# Fri Aug 22 20:04:55	7950508.000
#
_filter1()
{
    sed \
	-e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z]  *[0-9][0-9]* [0-2][0-9]:[0-5][0-9]:[0-5][0-9]/DATE/' \
	-e 's/[ 	][ 	]*[0-9][0-9]*\.[0-9][0-9]*/ NUMBER/'
}

# hostname(1)
#
_filter2()
{
    sed \
	-e "s/`hostname`/MYHOSTNAME/g" \
	-e "s/local:/MYHOSTNAME/g"
}

# real QA test starts here
echo "=== expect output ==="
pmdumptext -s 1 'localhost:mem.util.used' | _filter1

echo
echo "=== expect No route to host, no valid metrics ==="
pmdumptext -s 1 'no.such.host.pcp.io:mem.util.used'

echo
echo "=== expect No route to host, no valid metrics [instance case] ==="
pmdumptext -s 1 'no.such.host.pcp.io:proc.psinfo.utime[12345]'

echo
echo "=== expect No route to host, no valid metrics -h [instance case] ==="
pmdumptext -s 1 -h no.such.host.pcp.io 'proc.psinfo.utime[12345]'

_service pcp stop >/dev/null
echo
echo "=== pmcd not running, default case ==="
pmdumptext -s 1 'sample.bin[bin-300]' 2>&1 | _filter2
echo
echo "=== pmcd not running, host in metricspec case ==="
pmdumptext -s 1 'localhost:proc.psinfo.utime[12345]'
echo
echo "=== pmcd not running, -h localhost case ==="
pmdumptext -s 1 -h localhost 'proc.psinfo.utime[12345]'
_service pcp start >/dev/null
_wait_for_pmcd
_wait_for_pmlogger

# success, all done
status=0

exit