This file is indexed.

/var/lib/pcp/testsuite/871 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
78
79
80
81
82
83
84
85
#!/bin/sh
# PCP QA Test No. 871
# pmie - string expressions and @N ... from Nathan's email
# Subject: pmie support for string-typed metrics
# Date: 13 April 2016
#
# Copyright (c) 2016 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

_set_write_me()
{
    pmstore sampledso.string.write_me "$1" >/dev/null
    pmstore sampledso.ulong.write_me "$1" >/dev/null
    pmstore sampledso.double.write_me "$1" >/dev/null
    case "$1" in
    13)
	pmstore -i bin-300 sample.bin 300 >/dev/null
	;;
    *)
	pmstore -i bin-300 sample.bin "$1" >/dev/null
	;;
    esac
}

status=1	# failure is the default!
$sudo rm -rf $tmp $tmp.* $seq.full
trap "cd $here; _set_write_me 13; rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15

_filter()
{
    sed \
	-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/DATE [12][0-9][0-9][0-9]/DATE/' \
	-e '/evaluator exiting/s/pmie([0-9][0-9]*)/pmie(PID)/' \
	-e '/Performance Co-Pilot Inference Engine/s/Version .*/Version .../' \
    | LC_COLLATE=POSIX sort \
    | uniq
}

# real QA test starts here
cat <<'End-of-File' | pmie -t 0.5sec -T 5sec >$tmp.out 2>$tmp.err &
sampledso.string.write_me @1 != sampledso.string.write_me @0 && sampledso.string.write_me != "13" -> print "case 0 OK";
sampledso.string.write_me @0 != sampledso.string.write_me @1 && sampledso.string.write_me @1 != "13" -> print "case 1 OK";
sampledso.ulong.write_me @1 != sampledso.ulong.write_me @0 && sampledso.ulong.write_me != 13 -> print "case 2 OK";
sampledso.double.write_me @0 != sampledso.double.write_me @1 && sampledso.double.write_me @1 != 13 -> print "case 3 OK";
sampledso.double.write_me @1 != sampledso.double.write_me @0 && sampledso.double.write_me != 13 -> print "case 4 OK";
sampledso.double.write_me @0 != sampledso.double.write_me @1 && sampledso.double.write_me @1 != 13 -> print "case 5 OK";
ruleset
    pmcd.timezone @0 == pmcd.timezone @1 -> print "case 6 OK"
else
    pmcd.timezone @0 != pmcd.timezone @1 -> print "case 6 BAD"
otherwise
    -> print "case 6 startup";
ruleset
    all_inst ( sample.string.bin @0 == sample.string.bin @1 ) -> print "case 7 OK"
else
    some_inst ( sample.string.bin @0 != sample.string.bin @1 ) -> print "case 7 OK-change"
otherwise
    -> print "case 7 startup";
End-of-File

sleep 2
_set_write_me 42
sleep 2
_set_write_me 13

wait

echo "=== std out ==="
_filter <$tmp.out
echo
echo "=== std err ==="
_filter <$tmp.err

# success, all done
status=0
exit