This file is indexed.

/var/lib/pcp/testsuite/1017 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
#!/bin/sh
# PCP QA Test No. 1017
# Test QmcMetric functionality
#
seq=`basename $0`
echo "QA output created by $seq"
. ./common.qt

[ -x qt/qmc_metric/qmc_metric ] || _notrun "qmc_metric not built or installed"

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

SIMPLE_CONF=$PCP_PMDAS_DIR/simple/simple.conf
status=1	# failure is the default!
rm -f $seq.full

_cleanup()
{
    [ -f $tmp.conf ] && $sudo cp $tmp.conf $PCP_PMDAS_DIR/simple/simple.conf
    [ -f $tmp.pmcd.conf ] && $sudo cp $tmp.pmcd.conf $PCP_PMCDCONF_PATH
    $sudo killall -HUP pmcd
    _wait_for_pmcd
    rm -f $tmp.*
}

_filter()
{
    tee $here/$seq.full |\
    sed \
	-e "s/$host/HOST/g" \
	-e "/^sample\.seconds/s/= 0.9[0-9]*/= 1/g" \
	-e "/^sample\.seconds/s/= 1.0[0-9]*/= 1/g" \
	-e "/^sample\.seconds/s/= 1 /= NUMBER /g" \
	-e "/^sample\.seconds/s/= 0 /= NUMBER /g" \
	-e '/ minute" /s/= [0-9][0-9]*\.[0-9]*/= NUMBER/g' \
	-e '/ minute" /s/= [0-9][0-9]*/= NUMBER/g' \
	-e "s/ptr = 0x[1-9a-f][0-9a-f]*/ptr = 0x########/g" \
	-e '/"sec"/{
s/[0-9][0-9]* none/VALUE none/
s/\[[0-9][0-9]*]/[I]/
}' \
	-e '/"min"/{
s/[0-9][0-9]* none/VALUE none/
s/\[[0-9][0-9]*]/[J]/
}' \
	-e '/"hour"/{
s/[0-9][0-9]* none/VALUE none/
s/\[[0-9][0-9]*]/[K]/
}' \
	-e "/hinv\.ncpu =/s/[0-9][0-9]* none/VALUE none/" \
	-e "/lookupDesc:/s/29\.0\.31$/<pmid for sample.string.hullo>/" \
	-e "/lookupDesc:/s/29\.0\.6$/<pmid for sample.bin>/" \
	-e "/lookupDesc:/s/29\.0\.2$/<pmid for sample.seconds>/" \
	-e "/lookupDesc:/s/1\.18\.2$/<pmid for hinv.ncpu>/" \
	-e "/lookupDesc:/s/60\.0\.32$/<pmid for hinv.ncpu>/" \
	-e "/lookupDesc:/s/1\.18\.3$/<pmid for kernel.all.load>/" \
	-e "/lookupDesc:/s/60\.2\.0$/<pmid for kernel.all.load>/" \
	-e "/lookupPMID:/s/60\.2\.0$/<pmid for kernel.all.load>/" \
	-e "/lookupInDom:/s/1\.5$/<indom for kernel.all.load>/" \
	-e "/lookupInDom:/s/60\.2$/<indom for kernel.all.load>/" \
	-e "/lookupInDom:/s/29\.2$/<indom for sample.bin>/" \
	-e "/::genProfile/s/id = [0-9]*,/id = NNN,/" \
	-e "/::genProfile/s/ptr = 0$/ptr = 0x0/"

}

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

# real QA test starts here

cp $SIMPLE_CONF $tmp.conf
echo "sec" > $tmp.newconf
$sudo rm -f $SIMPLE_CONF
$sudo cp $tmp.newconf $SIMPLE_CONF

cp $PCP_PMCDCONF_PATH $tmp.pmcd.conf
cd $PCP_PMDAS_DIR/simple
$sudo ./Install </dev/null >$tmp.install 2>&1
_check_metric simple.now

cd $here/qt/qmc_metric
$sudo ./qmc_metric -DPMC,OPTFETCH 2>&1 | _filter

cd $PCP_PMDAS_DIR/simple
$sudo cp $tmp.pmcd.conf $PCP_PMCDCONF_PATH
$sudo cp $tmp.conf $SIMPLE_CONF
rm -f $tmp.pmcd.conf $tmp.conf
$sudo ./Remove </dev/null >$tmp.remove 2>&1

# success, all done
status=0
exit