3 # Exercise fixes for remotely triggered memory leaks in pmcd
5 # Copyright (c) 2013 Red Hat. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 [ -n "$PCP_PYTHON_PROG" ] || _notrun
"no acceptable python to run secure/leak-*"
21 status
=1 # failure is the default!
22 $sudo rm -rf $tmp.
* $seq.full
23 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
27 pmprobe
-h $host -v pmcd.datasize \
28 |
tee -a $here/$seq.full \
32 # real QA test starts here
33 echo "Initial pmcd memory size:" > $seq.full
36 for leak_test
in leak-
*
38 echo "$leak_test checking: " |
tee -a $here/$seq.full
39 python
$leak_test $host $iterate
40 pmcd_wait
-t $timeout -h $host
42 echo "$leak_test complete sts=$sts" |
tee -a $here/$seq.full
43 [ $sts -ne 0 ] && exit
45 # allow for max 64KB increase (several pages on 64KB systems)
46 MEMSLOP
=`expr $MEMINIT + 640`
47 echo "init=$MEMINIT used=$MEMUSED slop=$MEMSLOP" >> $here/$seq.full
48 [ $MEMUSED -gt $MEMSLOP ] && exit
49 echo "$leak_test memory check=OK" |
tee -a $here/$seq.full