summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/Makefile.am4
-rwxr-xr-xtests/diag.sh2
-rwxr-xr-xtests/imtcp-tls-basic.sh5
-rw-r--r--tests/tcpflood.c1
-rw-r--r--tests/testsuites/imtcp-tls-basic.conf4
5 files changed, 10 insertions, 6 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e3fb406d..1a6c8f52 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -244,6 +244,10 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/diskqueue-fsync.conf \
imtcp-tls-basic.sh \
testsuites/imtcp-tls-basic.conf \
+ tls-certs/ca-key.pem \
+ tls-certs/ca.pem \
+ tls-certs/cert.pem \
+ tls-certs/key.pem \
imtcp-multiport.sh \
testsuites/imtcp-multiport.conf \
udp-msgreduc-orgmsg-vg.sh \
diff --git a/tests/diag.sh b/tests/diag.sh
index 82ff4054..650704a4 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -31,7 +31,7 @@ case $1 in
rm -f work rsyslog.out.log rsyslog2.out.log rsyslog.out.log.save # common work files
rm -rf test-spool test-logdir
rm -f rsyslog.out.*.log rsyslog.random.data work-presort rsyslog.pipe
- rm -f rsyslog.input
+ rm -f rsyslog.input rsyslog.conf.tlscert
echo -------------------------------------------------------------------------------
;;
'startup') # start rsyslogd with default params. $2 is the config file name to use
diff --git a/tests/imtcp-tls-basic.sh b/tests/imtcp-tls-basic.sh
index d00f95d6..bfe24880 100755
--- a/tests/imtcp-tls-basic.sh
+++ b/tests/imtcp-tls-basic.sh
@@ -3,8 +3,11 @@
echo ===============================================================================
echo \[imtcp-tls-basic.sh\]: testing imtcp in TLS mode - basic test
source $srcdir/diag.sh init
+echo \$DefaultNetstreamDriverCAFile $srcdir/tls-certs/ca.pem >rsyslog.conf.tlscert
+echo \$DefaultNetstreamDriverCertFile $srcdir/tls-certs/cert.pem >>rsyslog.conf.tlscert
+echo \$DefaultNetstreamDriverKeyFile $srcdir/tls-certs/key.pem >>rsyslog.conf.tlscert
source $srcdir/diag.sh startup imtcp-tls-basic.conf
-source $srcdir/diag.sh tcpflood -p13514 -m50000 -Ttls -Z./tls-certs/cert.pem -z./tls-certs/key.pem
+source $srcdir/diag.sh tcpflood -p13514 -m50000 -Ttls -Z$srcdir/tls-certs/cert.pem -z$srcdir/tls-certs/key.pem
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
source $srcdir/diag.sh wait-shutdown
source $srcdir/diag.sh seq-check 0 49999
diff --git a/tests/tcpflood.c b/tests/tcpflood.c
index d72a4fe4..49b1e9e6 100644
--- a/tests/tcpflood.c
+++ b/tests/tcpflood.c
@@ -924,7 +924,6 @@ int main(int argc, char *argv[])
* connections, we need to make sure we have a high enough
* limit. -- rgerhards, 2010-03-25
*/
- struct rlimit maxFiles;
maxFiles.rlim_cur = numConnections + 20;
maxFiles.rlim_max = numConnections + 20;
if(setrlimit(RLIMIT_NOFILE, &maxFiles) < 0) {
diff --git a/tests/testsuites/imtcp-tls-basic.conf b/tests/testsuites/imtcp-tls-basic.conf
index 7f66545c..a94a00ef 100644
--- a/tests/testsuites/imtcp-tls-basic.conf
+++ b/tests/testsuites/imtcp-tls-basic.conf
@@ -8,9 +8,7 @@ $MainMsgQueueTimeoutShutdown 10000
$DefaultNetstreamDriver gtls
# certificate files - just CA for a client
-$DefaultNetstreamDriverCAFile ./tls-certs/ca.pem
-$DefaultNetstreamDriverCertFile ./tls-certs/cert.pem
-$DefaultNetstreamDriverKeyFile ./tls-certs/key.pem
+$IncludeConfig rsyslog.conf.tlscert
$InputTCPServerStreamDriverMode 1
$InputTCPServerStreamDriverAuthMode anon
$InputTCPServerRun 13514