summaryrefslogtreecommitdiffstats
path: root/tests/imtcp-multiport.sh
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-27 12:00:14 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-27 12:00:14 +0200
commit33316de49b7775ac40dd0ec0f4b7ff6256ccde78 (patch)
treeedeec9b609baf2011838f7dbfcb6fc3bd82f29e7 /tests/imtcp-multiport.sh
parentaa9426f683fa6af9280bc63050ee0187ba4c57e1 (diff)
parent35ea061f62cf0cbae074b2df47dc6b462da4fd20 (diff)
downloadrsyslog-33316de49b7775ac40dd0ec0f4b7ff6256ccde78.tar.gz
rsyslog-33316de49b7775ac40dd0ec0f4b7ff6256ccde78.tar.bz2
rsyslog-33316de49b7775ac40dd0ec0f4b7ff6256ccde78.zip
Merge branch 'master' into ultra-reliable
Conflicts: tests/Makefile.am tests/diskqueue.sh tests/imtcp-multiport.sh tests/manytcp.sh tests/memq-persist.sh
Diffstat (limited to 'tests/imtcp-multiport.sh')
-rwxr-xr-xtests/imtcp-multiport.sh78
1 files changed, 18 insertions, 60 deletions
diff --git a/tests/imtcp-multiport.sh b/tests/imtcp-multiport.sh
index 73ab9558..702f8834 100755
--- a/tests/imtcp-multiport.sh
+++ b/tests/imtcp-multiport.sh
@@ -8,73 +8,31 @@
# added 2009-05-22 by Rgerhards
# This file is part of the rsyslog project, released under GPLv3
echo testing imtcp multiple listeners
-rm -f work rsyslog.out.log rsyslog.out.log.save # work files
-../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/imtcp-multiport.conf &
-sleep 1
-echo "rsyslogd started with pid " `cat rsyslog.pid`
-./tcpflood 127.0.0.1 13514 1 10000
-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
-$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages
-kill `cat rsyslog.pid`
-rm -f work
-sort < rsyslog.out.log > work
-./chkseq -fwork -e9999
-if [ "$?" -ne "0" ]; then
- # rm -f work rsyslog.out.log
- echo "sequence error detected"
- exit 1
-fi
-rm -f work rsyslog.out.log
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup imtcp-multiport.conf
+source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 10000
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh seq-check 0 9999
+source $srcdir/diag.sh exit
#
#
# ### now complete new cycle with other port ###
#
#
-rm -f work rsyslog.out.log rsyslog.out.log.save # work files
-../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/imtcp-multiport.conf &
-sleep 1
-echo "rsyslogd started with pid " `cat rsyslog.pid`
-./tcpflood 127.0.0.1 13515 1 10000
-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
-$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages
-kill `cat rsyslog.pid`
-rm -f work
-sort < rsyslog.out.log > work
-./chkseq -fwork -e9999
-if [ "$?" -ne "0" ]; then
- # rm -f work rsyslog.out.log
- echo "sequence error detected"
- exit 1
-fi
-rm -f work rsyslog.out.log
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup imtcp-multiport.conf
+source $srcdir/diag.sh tcpflood 127.0.0.1 13515 1 10000
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh seq-check 0 9999
+source $srcdir/diag.sh exit
#
#
# ### now complete new cycle with other port ###
#
#
-rm -f work rsyslog.out.log rsyslog.out.log.save # work files
-../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/imtcp-multiport.conf &
-sleep 1
-echo "rsyslogd started with pid " `cat rsyslog.pid`
-./tcpflood 127.0.0.1 13516 1 10000
-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
-$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages
-kill `cat rsyslog.pid`
-rm -f work
-sort < rsyslog.out.log > work
-./chkseq -fwork -e9999
-if [ "$?" -ne "0" ]; then
- # rm -f work rsyslog.out.log
- echo "sequence error detected"
- exit 1
-fi
-rm -f work rsyslog.out.log
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup imtcp-multiport.conf
+source $srcdir/diag.sh tcpflood 127.0.0.1 13516 1 10000
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh seq-check 0 9999
+source $srcdir/diag.sh exit