summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am4
-rwxr-xr-xtests/manyptcp.sh13
-rw-r--r--tests/nettester.c4
-rw-r--r--tests/testsuites/manyptcp.conf12
4 files changed, 30 insertions, 3 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 62d45228..9bef8ff9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -314,11 +314,13 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/dircreate_off.conf \
cfg.sh
-uxsockrcvr_SOURCES = uxsockrcvr.c
ourtail_SOURCES = ourtail.c
msleep_SOURCES = msleep.c
chkseq_SOURCES = chkseq.c
+uxsockrcvr_SOURCES = uxsockrcvr.c
+uxsockrcvr_LDADD = $(SOL_LIBS)
+
tcpflood_SOURCES = tcpflood.c
tcpflood_LDADD = $(SOL_LIBS)
diff --git a/tests/manyptcp.sh b/tests/manyptcp.sh
new file mode 100755
index 00000000..3ed5493b
--- /dev/null
+++ b/tests/manyptcp.sh
@@ -0,0 +1,13 @@
+# test many concurrent tcp connections
+echo ====================================================================================
+echo TEST: \[manyptcp.sh\]: test imptcp with large connection count
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup manyptcp.conf
+# the config file specifies exactly 1100 connections
+source $srcdir/diag.sh tcpflood -c1000 -m40000
+# the sleep below is needed to prevent too-early termination of the tcp listener
+sleep 1
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh wait-shutdown # we need to wait until rsyslogd is finished!
+source $srcdir/diag.sh seq-check 0 39999
+source $srcdir/diag.sh exit
diff --git a/tests/nettester.c b/tests/nettester.c
index 7c8c413a..9e68ebcc 100644
--- a/tests/nettester.c
+++ b/tests/nettester.c
@@ -401,8 +401,8 @@ processTestFile(int fd, char *pszFileName)
}
if(strcmp(expected, buf)) {
++iFailed;
- printf("\nExpected Response:\n'%s'\nActual Response:\n'%s'\n",
- expected, buf);
+ printf("\nFile %s:\nExpected Response:\n'%s'\nActual Response:\n'%s'\n",
+ pszFileName, expected, buf);
ret = 1;
}
diff --git a/tests/testsuites/manyptcp.conf b/tests/testsuites/manyptcp.conf
new file mode 100644
index 00000000..4069f977
--- /dev/null
+++ b/tests/testsuites/manyptcp.conf
@@ -0,0 +1,12 @@
+# Test for tcp "flood" testing
+# rgerhards, 2009-04-08
+$IncludeConfig diag-common.conf
+
+$ModLoad ../plugins/imptcp/.libs/imptcp
+$MainMsgQueueTimeoutShutdown 10000
+$MaxOpenFiles 2000
+$InputPTCPServerRun 13514
+
+$template outfmt,"%msg:F,58:2%\n"
+$template dynfile,"rsyslog.out.log" # trick to use relative path names!
+:msg, contains, "msgnum:" ?dynfile;outfmt