Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 783
bloba9eb8be3eeae25839b42d952a06e4bed30188bc3
1 #!/bin/sh
2 # PCP QA Test No. 783
3 # Check for memory issues in RPM PMDA instance handling
5 # Copyright (c) 2013 Red Hat. All Rights Reserved.
7 seq=`basename $0`
8 echo "QA output created by $seq"
10 . ./common.rpm
11 _rpm_support_tests
12 _check_valgrind
14 status=1 # failure is the default!
15 $sudo rm -rf $tmp.* $seq.full
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
18 # sometimes (vm19)
19 # indirectly lost: 240 bytes in 10 blocks
20 # but mostly ...
21 # indirectly lost: 0 bytes in 0 blocks
23 _filter()
25 sed \
26 -e 's/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g' \
27 -e '/indirectly/{
28 s/240 bytes/0 bytes/
29 s/10 blocks/0 blocks/
30 }' \
31 # end
34 # real QA test starts here
35 _run_valgrind $PCP_PMDAS_DIR/rpm/pmdarpm -C 2>&1 | _filter
37 # success, all done
38 status=0
39 exit