/var/lib/pcp/testsuite/1367 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 | #!/bin/sh
# PCP QA Test No. 1367
# dbpmda for simple pmda labels, verifying python and C PMDAs produce output
#
# Copyright (c) 2017 Red Hat. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
. ./common.python
[ -d $PCP_PMDAS_DIR/simple ] || _notrun "simple PMDA directory is not installed"
$python -c "from pcp import pmda" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "python pcp pmda module not installed"
test -f "$PCP_PMDAS_DIR/simple/pmdasimple.python"
[ $? -eq 0 ] || _notrun "python simple pmda not yet installed"
python_path=`which $python`
trap "rm -f $tmp.*; exit" 0 1 2 3 15
_filter()
{
sed \
-e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;" \
-e "s;$python_path;\$PCP_PYTHON_PROG;" \
-e "s;$python;python;" \
-e "/^Start/d" \
| _filter_dumpresult
}
domain=253
# ensure help text exists
cd "$PCP_PMDAS_DIR/simple"
$sudo ./Install </dev/null >/dev/null 2>&1
$sudo TERM=ansi dbpmda -n root <<End-of-File 2>&1 | _filter > $tmp.simple.python
open pipe $python_path pmdasimple.python
label domain
label indom $domain.0
label indom $domain.1
label cluster $domain.0
label cluster $domain.1
label cluster $domain.2
label item $domain.2.4
End-of-File
$sudo TERM=ansi dbpmda -n root <<End-of-File 2>&1 | _filter > $tmp.simple.C
open pipe pmdasimple -d $domain
label domain
label indom $domain.0
label indom $domain.1
label cluster $domain.0
label cluster $domain.1
label cluster $domain.2
label item $domain.2.4
End-of-File
echo diff between C and python labels output, EXPECT NO OUTPUT
diff $tmp.simple.python $tmp.simple.C
status=0
exit
|