This file is indexed.

/var/lib/pcp/testsuite/602 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
#! /bin/sh
# PCP QA Test No. 602
# PCP 2.2 duplicate of 348 (exercise trace PMDA options)
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

seq=`basename $0`
echo "QA output created by $seq"

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

_cleanup()
{
    if [ -n "$savedtracehost" ]
    then
	PCP_TRACE_HOST=$savedtracehost; export PCP_TRACE_HOST
    fi
    rm -f $tmp.*
    exit $status
}

status=1	# failure is the default!
trap "_cleanup" 0 1 2 3 15

if [ -n "$PCP_TRACE_HOST" ]
then
    savedtracehost=$PCP_TRACE_HOST; unset PCP_TRACE_HOST
fi

pminfo trace >/dev/null 2>&1
remove=$?

cat <<EOF > $tmp.conf1
n



no
1 -1 0
-1
7
0
34
foo
3

EOF

cat <<EOF > $tmp.conf2
n



yes
no
1 -2 1
0
0
foo
-4

EOF

cat <<EOF > $tmp.default
n





EOF

# real QA test starts here

cd $PCP_PMDAS_DIR/trace

_filter_trace_usage()
{
    # drop the (new) -M option so we have consistent output
    grep -v 'user account'
}

echo "--- Usage message ---"
./pmdatrace -\? 2>&1 | _filter_trace_usage
echo

echo "--- Bad units specification #1 ---"
./pmdatrace -U 1,1,1 2>&1 | _filter_trace_usage
echo

echo "--- Bad units specification #2 ---"
./pmdatrace -U 1,,1,1,1,1 2>&1 | _filter_trace_usage
echo

echo "--- Bad units specification #3 ---"
./pmdatrace -U 1,3,foo,3,4,1 2>&1 | _filter_trace_usage
echo

_filter_trace_install()
{
    # some warnings are *expected* - no trace values yet
    _filter_pmda_install | sed \
	-e 's/ *[0-9]+ warnings,//g'
}

# Check units changes #1 ...
$sudo ./Install -R / <$tmp.conf1 2>&1 | _filter_trace_install
_wait_for_pmcd
pminfo -d trace.observe.value

# Check units changes #1 ...
$sudo ./Install -R / <$tmp.conf2 2>&1 | _filter_trace_install
_wait_for_pmcd
pminfo -d trace.counter.value

# Check a default install ...
$sudo ./Install -R / <$tmp.default 2>&1 | _filter_trace_install
_wait_for_pmcd
pminfo -d trace.observe.value trace.counter.value

[ $remove -eq 1 ] && $sudo $PCP_PMDAS_DIR/trace/Remove >/dev/null 2>&1

cd $here

# success, all done
status=0
exit