/var/lib/pcp/testsuite/749 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 | #!/bin/sh
# PCP QA Test No. 749
# Check pmcd static probes
#
# Copyright (c) 2013 Red Hat.
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
status=0 # success is the default!
$sudo rm -fr $tmp.* $seq.full
trap "rm -fr $tmp.*; exit \$status" 0 1 2 3 15
# If no systemtap, we cannot run the script
which stap >/dev/null 2>&1 || _notrun "No systemtap stap executable found"
# If running in FIPS mode, we cannot run this either
fips_enabled=0
fips_stsfile="/proc/sys/crypto/fips_enabled"
[ -f $fips_stsfile ] && fips_enabled=`cat $fips_stsfile`
test $fips_enabled -eq 0 || _notrun "FIPS enabled, no kernel stap testing"
# If no PCP support for probes, also bail out
static_probes=false
eval `pmconfig -L 2>/dev/null`
$static_probes || _notrun "No static probe support available in PCP build"
# real QA test starts here
cat <<End-of-File >$tmp.stap
global probe_hits
probe begin {
system("pminfo -f hinv >/dev/null")
system("pminfo -f kernel >/dev/null")
system("pminfo -d mem >/dev/null")
system("pminfo -f network >/dev/null")
system("pminfo -tT disk >/dev/null")
}
probe process("$PCP_BINADM_DIR/pmcd").mark("*") {
probe_hits <<< 1
}
probe timer.ms(1000) {
if (@count(probe_hits) > 0)
println("PASS")
else
println("FAIL")
exit()
}
End-of-File
echo "Using stap config:" >> $seq.full
cat $tmp.stap >> $seq.full
echo "Running pmcd process:" >> $seq.full
$PCP_PS_PROG $PCP_PS_ALL_FLAGS | grep pmcd >> $seq.full
# start systemtap and count pmcd probe hits
$sudo stap $tmp.stap | tee -a $tmp.out 2>&1
echo "Output from stap:" >> $seq.full
cat $tmp.out >> $seq.full
# success, all done
status=0
exit
|