This file is indexed.

/var/lib/pcp/testsuite/417 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
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
#! /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

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
arch=archives/bigace_v2
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
#
export TZ=EST-10

# real QA test starts here

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

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

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

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

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

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

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

echo
echo "=== pmlogsummary ==="
pmlogsummary -n $here/archives/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