This file is indexed.

/var/lib/pcp/testsuite/663 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
#! /bin/sh
# PCP QA Test No. 663
# checks pmwebd graphite (web application) http compression functionality
#
# Copyright (c) 2014-2016 Red Hat.
#
seq=`basename $0`
echo "QA output created by $seq"

. ./common.webapi
. ./common.python

test -d "$PCP_SHARE_DIR/webapps/graphite" || \
	_notrun "graphite webapp is not installed"
test -d "$PCP_SHARE_DIR/webapps/blinkenlights" || \
	_notrun "blinkenlights webapp is not installed"
which curl >/dev/null 2>&1 || _notrun "No curl binary installed"

$sudo rm -fr $tmp.dir
$sudo rm -f $tmp.*
rm -f $seq.full

signal=$PCP_BINADM_DIR/pmsignal
status=1	# failure is the default!
username=`id -u -n`

_cleanup()
{
    $sudo rm -fr $tmp.dir
    $sudo rm -f $tmp.*
    kill $pid
}
trap "_cleanup; exit \$status" 0 1 2 3 15

webport=44339   # not 44323, so system pmwebd is unaffected by test case
webargs="-U $username -p $webport"

echo
echo "=== pmwebd http compression ===" | tee -a $seq.full

$PCP_BINADM_DIR/pmwebd $webargs -GX -R $PCP_SHARE_DIR/webapps -I -i 15 -A `pwd` -N -M8 -x/dev/tty -d1 -vvvvv -l $tmp.out &
pid=$!
_wait_for_pmwebd_logfile $tmp.out $webport

grep -q "HTTP compression compiled-in" $tmp.out || _notrun "no http compression"

echo fetch some metrics via un/compressed modes, compare results | tee -a $seq.full
url="http://localhost:$webport/graphite/render?format=json&target=*/node_archive.proc.psinfo.pid.*&from=15:50_20131127&until=1385585880&maxDataPoints=100"
echo "fetching without compression requested"
curl -v -D $tmp.hdr.1 -s -S "$url" > $tmp.out.1 2> $tmp.err.1
egrep 'gzip|deflate' $tmp.hdr.1
egrep 'gzip|deflate' $tmp.err.1
echo "repeating with compression requested"
curl -v -D $tmp.hdr.2 --compressed -s -S "$url" > $tmp.out.2 2> $tmp.err.2
egrep 'gzip|deflate' $tmp.hdr.2
egrep 'gzip|deflate' $tmp.err.2

echo "comparing compressed vs uncompressed outputs"
diff $tmp.out.1 $tmp.out.2 # should be empty result

ls -al $tmp.out.1 >> $seq.full
cat $tmp.hdr.1 >> $seq.full
ls -al $tmp.out.2 >> $seq.full
cat $tmp.hdr.2 >> $seq.full

status=0
exit