diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-25 14:20:45 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-25 14:20:45 +0200 |
commit | a853542b76cdd5604f11aa431867b9693b16e45f (patch) | |
tree | e19337d9e942ee0bc62fb08a60e0470b4868a344 /tests/imtcp-multiport.sh | |
parent | 1a0b77dc7154deea77dc4ca6417ff5ff62ff2ce7 (diff) | |
parent | b9549380270fa68e27e8ee3f049c7d34156a85ff (diff) | |
download | rsyslog-a853542b76cdd5604f11aa431867b9693b16e45f.tar.gz rsyslog-a853542b76cdd5604f11aa431867b9693b16e45f.tar.bz2 rsyslog-a853542b76cdd5604f11aa431867b9693b16e45f.zip |
Merge branch 'master' into solaris
Diffstat (limited to 'tests/imtcp-multiport.sh')
-rwxr-xr-x | tests/imtcp-multiport.sh | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/tests/imtcp-multiport.sh b/tests/imtcp-multiport.sh new file mode 100755 index 00000000..17480dae --- /dev/null +++ b/tests/imtcp-multiport.sh @@ -0,0 +1,80 @@ +# Test for multiple ports in imtcp +# This test checks if multiple tcp listener ports are correctly +# handled by imtcp +# +# NOTE: this test must (and can) be enhanced when we merge in the +# upgraded tcpflood program +# +# 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 work 0 9999 +if [ "$?" -ne "0" ]; then + # rm -f work rsyslog.out.log + echo "sequence error detected" + exit 1 +fi +rm -f work rsyslog.out.log +# +# +# ### 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 work 0 9999 +if [ "$?" -ne "0" ]; then + # rm -f work rsyslog.out.log + echo "sequence error detected" + exit 1 +fi +rm -f work rsyslog.out.log +# +# +# ### 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 work 0 9999 +if [ "$?" -ne "0" ]; then + # rm -f work rsyslog.out.log + echo "sequence error detected" + exit 1 +fi +rm -f work rsyslog.out.log |