summaryrefslogtreecommitdiffstats
path: root/tests/linkedlistqueue.sh
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-20 16:08:23 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-20 16:08:23 +0200
commit8088f9b01a8344c63e7874836721c79d94a01d25 (patch)
treefb97cee60b0f04fcd8e6bbcdd4c680cb75137747 /tests/linkedlistqueue.sh
parent9f45b80ea9ea86d516c895d97fd8670df37e319e (diff)
downloadrsyslog-8088f9b01a8344c63e7874836721c79d94a01d25.tar.gz
rsyslog-8088f9b01a8344c63e7874836721c79d94a01d25.tar.xz
rsyslog-8088f9b01a8344c63e7874836721c79d94a01d25.zip
added explicit (base) test for linkedList and FixedArray queue modes
Diffstat (limited to 'tests/linkedlistqueue.sh')
-rwxr-xr-xtests/linkedlistqueue.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/linkedlistqueue.sh b/tests/linkedlistqueue.sh
new file mode 100755
index 00000000..aac1abb6
--- /dev/null
+++ b/tests/linkedlistqueue.sh
@@ -0,0 +1,26 @@
+# Test for Linkedlist queue mode
+# added 2009-05-20 by rgerhards
+# This file is part of the rsyslog project, released under GPLv3
+echo testing queue Linkedlist queue mode
+rm -f work rsyslog.out.log
+# enable this, if you need debug output: export RSYSLOG_DEBUG="debug"
+../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/arrayqueue.conf &
+sleep 1
+echo "rsyslogd started with pid " `cat rsyslog.pid`
+# 40000 messages should be enough
+./tcpflood 127.0.0.1 13514 1 40000
+if [ "$?" -ne "0" ]; then
+ echo "error during tcpflood! see rsyslog.out.log.save for what was written"
+ cp rsyslog.out.log rsyslog.out.log.save
+fi
+sleep 4 # we need this so that rsyslogd can receive all outstanding messages
+kill `cat rsyslog.pid`
+rm -f work
+sort < rsyslog.out.log > work
+./chkseq work 0 39999
+if [ "$?" -ne "0" ]; then
+ # rm -f work rsyslog.out.log
+ echo "sequence error detected"
+ exit 1
+fi
+rm -f work rsyslog.out.log