summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-06 15:50:48 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-06 15:50:48 +0100
commit4fb7dd296efc6a798e884f0504fdf0bedebba9f5 (patch)
tree9b0b4bc4c7511983eadbf4cef41cd9637cfa62a4 /tests
parent68124ef1f63daef07ecf45d479ca9697cb099441 (diff)
downloadrsyslog-4fb7dd296efc6a798e884f0504fdf0bedebba9f5.tar.gz
rsyslog-4fb7dd296efc6a798e884f0504fdf0bedebba9f5.tar.xz
rsyslog-4fb7dd296efc6a798e884f0504fdf0bedebba9f5.zip
backported new testbench support for valgrind
Diffstat (limited to 'tests')
-rwxr-xr-xtests/diag.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/diag.sh b/tests/diag.sh
index 2f307750..64b507e6 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -34,7 +34,12 @@ case $1 in
;;
'startup') # start rsyslogd with default params. $2 is the config file name to use
# returns only after successful startup, $3 is the instance (blank or 2!)
- $valgrind ../tools/rsyslogd -c4 -u2 -n -irsyslog$3.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/$2 &
+ $valgrind ../tools/rsyslogd -c6 -u2 -n -irsyslog$3.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/$2 &
+ $srcdir/diag.sh wait-startup $3
+ ;;
+ 'startup-vg') # start rsyslogd with default params under valgrind control. $2 is the config file name to use
+ # returns only after successful startup, $3 is the instance (blank or 2!)
+ valgrind --error-exitcode=10 --malloc-fill=ff --free-fill=fe --leak-check=full ../tools/rsyslogd -c6 -u2 -n -irsyslog$3.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/$2 &
$srcdir/diag.sh wait-startup $3
;;
'wait-startup') # wait for rsyslogd startup ($2 is the instance)
@@ -58,6 +63,18 @@ case $1 in
exit 1
fi
;;
+ 'wait-shutdown-vg') # actually, we wait for rsyslog.pid to be deleted. $2 is the
+ # instance
+ wait `cat rsyslog.pid`
+ export RSYSLOGD_EXIT=$?
+ echo rsyslogd run exited with $RSYSLOGD_EXIT
+ if [ -e core.* ]
+ then
+ echo "ABORT! core file exists, starting interactive shell"
+ bash
+ exit 1
+ fi
+ ;;
'wait-queueempty') # wait for main message queue to be empty. $2 is the instance.
if [ "$2" == "2" ]
then