This file is indexed.

/var/lib/pcp/testsuite/751 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
#!/bin/sh
# PCP QA Test No. 751
# Exercise RPM Package Manager PMDA log rewriting rules
#
# Copyright (c) 2014 Red Hat.
#
seq=`basename $0`
echo "QA output created by $seq"

. ./common.rpm
_rpm_support_tests

status=1	# failure is the default!
$sudo rm -fr $tmp.* $seq.full

_cleanup()
{
    unset rpm_name
    unset rpm_inst
    _rpm_cleanup
}
trap "_cleanup" 0 1 2 3 15

create_rewrite_logs()
{
    cat <<'End-of-File' >$tmp.log.conf
log mandatory on once {
  rpm.arch
  rpm.buildhost
  rpm.buildtime
  rpm.description
  rpm.epoch
  rpm.group
  rpm.installtime
  rpm.license
  rpm.packager
  rpm.release
  rpm.size
  rpm.sourcerpm
  rpm.summary
  rpm.url
  rpm.vendor
  rpm.version
  rpm.name
  rpm.refresh.count
  rpm.refresh.time.user
  rpm.refresh.time.sys
  rpm.refresh.time.elapsed
  rpm.datasize
  rpm.total.count
  rpm.total.bytes
}
End-of-File
    pmlogger -r -c $tmp.log.conf -T 2sec $tmp.log
    echo 'metric rpm.size { type -> U32 }' > $tmp.lrw.conf
    pmlogrewrite -c $tmp.lrw.conf -w $tmp.log $tmp.log-1
    migrate=$PCP_VAR_DIR/config/pmlogrewrite/rpm_migrate.conf
    pmlogrewrite -c $migrate -w $tmp.log-1 $tmp.log-2
    rm $tmp.log.conf $tmp.lrw.conf
    echo "+++ log +++" >>$seq.full
    pmdumplog -z -dil $tmp.log   | tee -a $seq.full >$tmp.log.dump
    echo "+++ log-1 +++" >>$seq.full
    pmdumplog -z -dil $tmp.log-1 | tee -a $seq.full >$tmp.log-1.dump
    echo "+++ log-2 +++" >>$seq.full
    pmdumplog -z -dil $tmp.log-2 | tee -a $seq.full >$tmp.log-2.dump
}

# real QA test starts here
echo
_rpm_pmda_prepare

# wait for metrics to appear before starting logging
rpm_name=pcp
rpm_inst=`rpm -q pcp`
_rpm_package_install_await

create_rewrite_logs
echo "old -> new changes" | tee -a $seq.full
diff -U 1 $tmp.log-1.dump $tmp.log-2.dump | tee -a $seq.full | sed -e '/^---/d' -e '/^+++/d'
echo "new -> ref changes ... expect none" | tee -a $seq.full
diff -U 1 $tmp.log-2.dump $tmp.log.dump | tee -a $seq.full | sed -e '/^---/d' -e '/^+++/d'

# success, all done
status=0
exit