This file is indexed.

/var/lib/pcp/testsuite/512 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
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
#!/bin/sh
# PCP QA Test No. 512
# lock recursion depth for some pcp apps
#
# Copyright (c) 2012 Ken McDonell.  All Rights Reserved.
#

# get standard filters
. ./common.product
. ./common.filter
. ./common.check

seq=`basename $0`

rm -f $seq.out
if [ $PCP_VER -lt 3809 ]
then
    ln $seq.out.1 $seq.out || exit 1
else
    ln $seq.out.2 $seq.out || exit 1
fi

echo "QA output created by $seq"

src/check_fault_injection >/dev/null 2>&1 || \
    _notrun "libpcp not built with fault injection & lock tracing enabled"

if [ -d ../src ]
then
    SRC=../src
else
    _notrun "PCP source not found at ../src"
fi

status=0	# success is the default!
$sudo rm -rf $tmp.* $seq.full
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15

# we need to run part of the make to get headers and libraries setup
# in $SRC
#
for dir in include libpcp/src
do
    echo "$SRC/$dir ..." >>$seq.full
    cd $SRC/$dir
    if make 2>$tmp.err >>$here/$seq.full
    then
	cat $tmp.err >>$here/$seq.full
    else
	echo "Arrgh ... make failed in $SRC/$dir"
	cat $tmp.err
	status=1
	exit
    fi
    cd $here
done

_filter()
{
    tee -a $seq.full \
    | sed -n \
	-e '/count=/s/^[^ ][^ ]* //p' \
    | LC_COLLATE=POSIX sort \
    | uniq
}

_pre()
{
    if [ ! -d $1 ]
    then
	echo "_pre: botch: $1 does not exist"
    else
	cd $1
	make clean >/dev/null 2>&1
	# This is a gross hack ...
	# need to over-ride LDFLAGS from the PCP builddefs so we search for
	# libpcp.so in the libpcp_fault directory
	#
	if LCFLAGS=-DPM_MULTI_THREAD_DEBUG=1 LDFLAGS="-L../../src/libpcp_fault/src" make $2 >$tmp.out 2>&1
	then
	    mv $2 $2.debug
	    make clean >/dev/null 2>&1
	else
	    echo "_pre: botch: make failed"
	    cat $tmp.out
	fi
	cd $here
    fi
}

_post()
{
    if [ ! -d $1 ]
    then
	echo "_post: botch: $1 does not exist"
    else
	cd $1
	rm -f $2.debug
	cd $here
    fi
}

# real QA test starts here
export LD_PRELOAD=$PCP_LIB_DIR/libpcp_fault.so


echo "== pminfo ==" | tee -a $seq.full
_pre $SRC/pminfo pminfo
$SRC/pminfo/pminfo.debug -v -Dlock >/dev/null 2>$tmp.trace
_post $SRC/pminfo pminfo
_filter <$tmp.trace

echo | tee -a $seq.full
echo "== pmlogger ==" | tee -a $seq.full
sed -e 's/1 sec/50 msec/' <src/config.foo >$tmp.config
_pre $SRC/pmlogger/src pmlogger
$SRC/pmlogger/src/pmlogger.debug -Dlock -c $tmp.config -s 20 -l $tmp.log $tmp
_post $SRC/pmlogger/src pmlogger
_filter <$tmp.log

echo | tee -a $seq.full
echo "== pmlogextract ==" | tee -a $seq.full
for arch in a b c
do
    for i in 0 index meta
    do
	cp src/foo.$i $tmp-$arch.$i
    done
done
_pre $SRC/pmlogextract pmlogextract
$SRC/pmlogextract/pmlogextract.debug -Dlock $tmp-a $tmp-b $tmp-c $tmp-out 2>$tmp.trace
_post $SRC/pmlogextract pmlogextract
_filter <$tmp.trace

echo | tee -a $seq.full
echo "== pmdumplog ==" | tee -a $seq.full
_pre $SRC/pmdumplog pmdumplog
$SRC/pmdumplog/pmdumplog.debug -a -Dlock $tmp-out >$tmp.trace 2>&1
_post $SRC/pmdumplog pmdumplog
_filter <$tmp.trace

echo | tee -a $seq.full
echo "== dbpmda ==" | tee -a $seq.full
_pre $SRC/dbpmda/src dbpmda
# based on QA 137
$SRC/dbpmda/src/dbpmda.debug -Dlock -n $PCP_PMDAS_DIR/simple/root -ie >$tmp.trace 2>&1 <<End-of-File
open dso $PCP_PMDAS_DIR/simple/pmda_simple.$DSO_SUFFIX simple_init 253
getdesc on
desc simple.numfetch
fetch simple.numfetch
desc simple.color
fetch simple.color
instance 253.0
open pipe $PCP_PMDAS_DIR/simple/pmdasimple -d 253
desc simple.numfetch
fetch simple.numfetch
desc simple.color
fetch simple.color
instance 253.0
End-of-File
_post $SRC/dbpmda/src dbpmda
_filter <$tmp.trace


# success, all done
exit