Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 1082
blob08144fc00b4e5164671b885659f5793ce9733767
1 #!/bin/sh
2 # PCP QA Test No. 1082
3 # Exercise python inst string encoding/decoding bug that
4 # Martins observed and fixed. See "/tmp/1µsec" instance
5 # in proc.psinfo.pid sample in archives/procpid-encode &
6 # also instance #8087 in archives/procpid-encode2.
8 # Copyright (c) 2015 Red Hat. All Rights Reserved.
11 seq=`basename $0`
12 echo "QA output created by $seq"
14 . ./common.check
15 . ./common.setup
16 [ -f common.python ] || _notrun "No python bindings installed"
18 . ./common.python
20 [ -n "$PCP_PYTHON_PROG" ] || _notrun "no acceptable python to run src/procpid.python"
22 status=1 # failure is the default!
23 $sudo rm -rf $tmp.* $seq.full
24 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
26 # real QA test starts here
27 echo "== archives/procpid-encode"
28 $python $here/src/procpid.python --archive $here/archives/procpid-encode \
29 proc.psinfo.pid
30 echo
32 echo "== archives/procpid-encode2"
33 $python $here/src/procpid.python --archive $here/archives/procpid-encode2 \
34 proc.psinfo.cpusallowed
35 echo
37 # success, all done
38 status=0
39 exit