This file is indexed.

/var/lib/pcp/testsuite/417 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
#! /bin/sh
# PCP QA Test No. 417
# Exercise tools with a corrupted archive
#
# 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

rm -f $seq.out
if [ $PCP_VER -lt 3600 ]
then
    # V1 archives supported
    arch=src/bigace
    case $PCP_PLATFORM
    in
	irix|linux)
	    ln $seq.$PCP_PLATFORM.1 $seq.out || exit 1
	    ;;
	darwin|solaris)
	    # same output for Mac OS X and OpenSolaris
	    ln $seq.linux.1 $seq.out || exit 1
	    ;;
	*)
	    _notrun "Need qualified output for $PCP_PLATFORM"
	    ;;
    esac
else
    # no support for V1 archives
    arch=src/bigace_v2
    case $PCP_PLATFORM
    in
	irix|linux)
	    if [ $PCP_VER -lt 3604 ]
	    then
		ln $seq.$PCP_PLATFORM.2 $seq.out || exit 1
	    else
		ln $seq.$PCP_PLATFORM.3 $seq.out || exit 1
	    fi
	    ;;
	darwin|solaris)
	    # same output for Mac OS X and OpenSolaris
	    if [ $PCP_VER -lt 3604 ]
	    then
		ln $seq.linux.2 $seq.out || exit 1
	    else
		ln $seq.linux.3 $seq.out || exit 1
	    fi
	    ;;
	*)
	    echo "Arrgh ... need qualified output for $PCP_PLATFORM"
	    exit 1
	    ;;
    esac
fi

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

_check_core()
{
    if [ "`echo core*`" != "core*" ]
    then
	$PCP_ECHO_PROG $PCP_ECHO_N "Dumped core! (saved in $here as""$PCP_ECHO_C"
	for c in core*
	do
	    $sudo mv $c $here/$seq.$c
	    $PCP_ECHO_PROG $PCP_ECHO_N " $seq.$c""$PCP_ECHO_C"
	done
	echo ")"
    fi
}

rm -rf $tmp
mkdir $tmp
cd $tmp

# make the corrupted archive
#
cp $here/$arch.meta bad.meta
dd ibs=1 count=512 if=$here/$arch.index of=bad.index 2>/dev/null
dd ibs=1 count=512 if=$here/$arch.index >>bad.index 2>/dev/null
dd if=$here/$arch.0 ibs=1 count=2052 of=bad.0 2>/dev/null
dd if=/dev/zero ibs=1 count=1024 >>bad.0 2>/dev/null

# deal with an annoying libc error ... using TZ=:Australia/Melbourne
# causes the -z option to report the wrong time, at least for some
# times of the year
#
TZ=EST-10
export TZ

# real QA test starts here

echo
echo "=== pminfo ==="
pminfo -n $here/src/bigace.pmns -a bad >$tmp.out 2>$tmp.err
cat $tmp.err $tmp.out
_check_core

echo
echo "=== pminfo -f irix ==="
pminfo -n $here/src/bigace.pmns -a bad -f irix
_check_core

echo
echo "=== pmdumplog -t ==="
pmdumplog -n $here/src/bigace.pmns -z -t bad
_check_core

echo
echo "=== pmdumplog -t, no index ==="
mv bad.index save.index
pmdumplog -n $here/src/bigace.pmns -z -t bad
mv save.index bad.index
_check_core

echo
echo "=== pmdumplog -l ==="
pmdumplog -n $here/src/bigace.pmns -z -l bad
_check_core

echo
echo "=== pmdumplog -L ==="
pmdumplog -n $here/src/bigace.pmns -z -L bad
_check_core

echo
echo "=== pmdumplog -m ==="
pmdumplog -n $here/src/bigace.pmns -z -m bad >$tmp.out 2>$tmp.err
cat $tmp.err $tmp.out
_check_core

echo
echo "=== pmlogsummary ==="
pmlogsummary -n $here/src/bigace.pmns bad >$tmp.out 2>$tmp.err
cat $tmp.err $tmp.out | sed -e 's/^\*//g'
_check_core

# success, all done
status=0
exit