/var/lib/pcp/testsuite/739 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 | #!/bin/sh
# PCP QA Test No. 739
# Exercise python script automated option handling
#
# Copyright (c) 2014,2017 Red Hat.
#
seq=`basename $0`
echo "QA output created by $seq"
. ./common.python
status=1 # failure is the default!
$sudo rm -rf $tmp.* $seq.full
trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
$python -c "from pcp import pmapi" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "python pcp pmapi module not installed"
# see sickness note below
#
_filter_version()
{
sed \
-e 's/ [0-9]*\.[0-9]*\.[0-9]*$/ X.Y.Z/g' \
-e '/overrideCB: got option/d' \
# end
}
# real QA test starts here
echo && echo check no arguments
$python $here/src/test_pcp_options.py
echo && echo check non arguments
$python $here/src/test_pcp_options.py param1 param2
echo && echo check archive option and non arguments
$python $here/src/test_pcp_options.py -a file param
echo && echo check host option and hostzone
$python $here/src/test_pcp_options.py -h qa.r.us -z
echo && echo check timezone
$python $here/src/test_pcp_options.py --timezone UTC
echo && echo check option samples and interval
$python $here/src/test_pcp_options.py --samples=5 -t1
echo && echo check custom local long options
$python $here/src/test_pcp_options.py --list /tmp --force
echo && echo check custom local short options
$python $here/src/test_pcp_options.py -b
echo && echo check handling of non-option operands
$python $here/src/test_pcp_options.py param1 -b param2
echo && echo check version message generation
# more python3 sickness here ... if stdout is redirected, the
# overrideCB: got option 'V' message may just disappear, so we
# have to cull it in _filter_version, just in case!
#
$python $here/src/test_pcp_options.py -V 2>&1 | _filter_version
echo && echo check unknown option and usage message
$python $here/src/test_pcp_options.py --munchies
echo && echo check help option and usage message
$python $here/src/test_pcp_options.py --help
echo && echo check long-only option support
$python $here/src/test_pcp_options.py --longonly
# success, all done
status=0
exit
|