This file is indexed.

/var/lib/pcp/testsuite/1037 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
#!/bin/sh
# PCP QA Test No. 1037
# Test libpcp multi-archive support using pmclient_fg
#
# Copyright (c) 2016 Red Hat.  All Rights Reserved.
#

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

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

_get_libpcp_config
$multi_archive_contexts || _notrun "Multi-archive support is not available"

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

_filter()
{
    tmpx=`echo $tmp`
    sed -e 's/^Archive:.* Host:/ARCHIVE: Host:/' \
	-e "s|$tmpx|TMP|g"
}

# real QA test starts here
DIR=archives/multi
TOOL=pminfo
mkdir -p $tmp.archives

# Check that running pminfo on a set of archives performs identically
# to running it on the archive created by combining those same archives
# using pmlogextract.

# First, run pmlogextract against the archives.
IN="$DIR/20150508.11.44 $DIR/20150508.11.46 $DIR/20150508.11.50 $DIR/20150508.11.57"
OUT=$tmp.44+46+50+57.pmlogextract
rm -f $OUT.*
echo "Running pmlogextract $IN $OUT" | _filter | tee $seq.full
pmlogextract $IN $OUT 2>&1 >> $seq.full
[ $? -eq 0 ] || echo "Error running pmlogextract $IN $OUT -- see $seq.full"

# Now run pminfo against the extracted archive.
IN=$OUT
OUTBASE=$OUT.$TOOL.txt
echo "Running $TOOL -a $IN" | _filter
$TOOL -a $IN 2>&1 | _filter | tee $OUTBASE

# Now, run pminfo against the set of archives.
IN=$DIR/20150508.11.44,$DIR/20150508.11.46,$DIR/20150508.11.50,$DIR/20150508.11.57
OUT=$tmp.44+46+50+57.$TOOL.txt
echo "Running $TOOL -a $IN" | _filter
$TOOL -a $IN 2>&1 | _filter | tee $OUT

# Make sure the output is the same
echo "Running diff $OUTBASE $OUT" | _filter | tee -a $seq.full
diff $OUTBASE $OUT 2>&1 >> $seq.full
[ $? -eq 0 ] || echo "$OUT differs from $OUTBASE  -- see $seq.full"

# Now do it again, specifying the set of archives using the directory name
IN=$DIR
OUT=$tmp.$DIR.$TOOL.txt
echo "Running $TOOL -a $IN" | _filter
$TOOL -a $IN 2>&1 | _filter | tee $OUT

# Make sure the output is the same
echo "Running diff $OUTBASE $OUT" | _filter | tee -a $seq.full
diff $OUTBASE $OUT 2>&1 >> $seq.full
[ $? -eq 0 ] || echo "$OUT differs from $OUTBASE  -- see $seq.full"

# success, all done
status=0
exit