summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:54:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:54:33 +0000
commit371920392fe2deba74cfec8d471667f10d7028ed (patch)
tree3d98f5595bcff4c6dd42754e2bd6cce305d0151d /tests
parentReleasing progress-linux version 8.2404.0-2~progress7.99u1. (diff)
downloadrsyslog-371920392fe2deba74cfec8d471667f10d7028ed.tar.xz
rsyslog-371920392fe2deba74cfec8d471667f10d7028ed.zip
Merging upstream version 8.2406.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/Makefile.in8
-rwxr-xr-xtests/diag.sh4
-rwxr-xr-xtests/imdtls-basic-timeout.sh2
-rwxr-xr-xtests/imdtls-basic.sh2
-rwxr-xr-xtests/imtcp-tls-gtls-x509fingerprint-invld.sh2
-rwxr-xr-xtests/imtcp-tls-gtls-x509fingerprint.sh2
-rwxr-xr-xtests/imtcp-tls-ossl-basic-brokenhandshake-vg.sh2
-rwxr-xr-xtests/imtcp-tls-ossl-basic-stress.sh50
-rwxr-xr-xtests/imtcp-tls-ossl-basic-tlscommands.sh2
-rwxr-xr-xtests/imtcp-tls-ossl-x509fingerprint.sh2
-rwxr-xr-xtests/imtcp-tls-ossl-x509name.sh2
-rwxr-xr-xtests/imtcp-tls-ossl-x509valid.sh2
-rwxr-xr-xtests/imtcp_conndrop_tls.sh2
-rwxr-xr-xtests/manytcp-too-few-tls-vg.sh2
-rwxr-xr-xtests/omhttp-basic-ignorecodes-vg.sh3
-rwxr-xr-xtests/omhttp-basic-ignorecodes.sh44
-rwxr-xr-xtests/omhttp-batch-retry-metadata-vg.sh3
-rwxr-xr-xtests/omhttp-batch-retry-metadata.sh89
-rwxr-xr-xtests/omhttp-retry-timeout-vg.sh3
-rwxr-xr-xtests/omhttp-retry-timeout.sh49
-rwxr-xr-xtests/omprog-defaults.sh12
-rwxr-xr-xtests/omprog-if-error.sh3
-rwxr-xr-xtests/sndrcv_dtls_anon_ciphers.sh2
-rwxr-xr-xtests/sndrcv_dtls_certvalid_ciphers.sh2
-rwxr-xr-xtests/sndrcv_tls_anon_ipv6.sh2
-rwxr-xr-xtests/sndrcv_tls_certvalid_expired.sh2
-rwxr-xr-xtests/sndrcv_tls_certvalid_expired_defaultmode.sh2
-rwxr-xr-xtests/sndrcv_tls_certvalid_revoked.sh2
-rwxr-xr-xtests/sndrcv_tls_client_missing_cert.sh2
-rwxr-xr-xtests/sndrcv_tls_ossl_anon_ciphers.sh2
-rwxr-xr-xtests/sndrcv_tls_ossl_anon_ipv4.sh2
-rwxr-xr-xtests/sndrcv_tls_ossl_anon_rebind.sh2
-rwxr-xr-xtests/sndrcv_tls_ossl_certvalid_ciphers.sh2
-rwxr-xr-xtests/sndrcv_tls_ossl_certvalid_expired.sh2
-rwxr-xr-xtests/sndrcv_tls_ossl_certvalid_tlscommand.sh2
-rwxr-xr-xtests/testsuites/omprog-defaults-bin.sh4
37 files changed, 300 insertions, 28 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4534776..04223cd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1475,6 +1475,7 @@ TESTS += \
imtcp-tls-ossl-error-cert.sh \
imtcp-tls-ossl-error-key.sh \
imtcp-tls-ossl-error-key2.sh
+# imtcp-tls-ossl-basic-stress.sh
if HAVE_VALGRIND
TESTS += \
imtcp-tls-ossl-basic-vg.sh \
@@ -2426,6 +2427,7 @@ EXTRA_DIST= \
imtcp-tls-ossl-basic-tlscommands.sh \
imtcp-tls-ossl-basic-verifydepth.sh \
imtcp-tls-ossl-invalid-verifydepth.sh \
+ imtcp-tls-ossl-basic-stress.sh \
sndrcv_tls_ossl_anon_ipv4.sh \
sndrcv_tls_ossl_anon_ipv6.sh \
sndrcv_tls_ossl_anon_rebind.sh \
@@ -2614,6 +2616,7 @@ EXTRA_DIST= \
testsuites/htpasswd \
omhttp-auth.sh \
omhttp-basic.sh \
+ omhttp-basic-ignorecodes.sh \
omhttp-batch-fail-with-400.sh \
omhttp-batch-jsonarray-compress.sh \
omhttp-batch-jsonarray-retry.sh \
@@ -2624,6 +2627,11 @@ EXTRA_DIST= \
omhttp-batch-lokirest.sh \
omhttp-batch-lokirest-vg.sh \
omhttp-batch-newline.sh \
+ omhttp-batch-retry-metadata.sh \
+ omhttp-retry-timeout.sh \
+ omhttp-basic-ignorecodes-vg.sh \
+ omhttp-batch-retry-metadata-vg.sh \
+ omhttp-retry-timeout-vg.sh \
omhttp-retry.sh \
omhttp-httpheaderkey.sh \
omhttp-multiplehttpheaders.sh \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index aff58a9..cfc04df 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1300,6 +1300,7 @@ host_triplet = @host@
@ENABLE_OPENSSL_TRUE@@ENABLE_TESTBENCH_TRUE@ imtcp-tls-ossl-error-key.sh \
@ENABLE_OPENSSL_TRUE@@ENABLE_TESTBENCH_TRUE@ imtcp-tls-ossl-error-key2.sh
+# imtcp-tls-ossl-basic-stress.sh
@ENABLE_OPENSSL_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@am__append_94 = \
@ENABLE_OPENSSL_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ imtcp-tls-ossl-basic-vg.sh \
@ENABLE_OPENSSL_TRUE@@ENABLE_TESTBENCH_TRUE@@HAVE_VALGRIND_TRUE@ imtcp-tls-ossl-basic-brokenhandshake-vg.sh
@@ -2890,6 +2891,7 @@ EXTRA_DIST = \
imtcp-tls-ossl-basic-tlscommands.sh \
imtcp-tls-ossl-basic-verifydepth.sh \
imtcp-tls-ossl-invalid-verifydepth.sh \
+ imtcp-tls-ossl-basic-stress.sh \
sndrcv_tls_ossl_anon_ipv4.sh \
sndrcv_tls_ossl_anon_ipv6.sh \
sndrcv_tls_ossl_anon_rebind.sh \
@@ -3078,6 +3080,7 @@ EXTRA_DIST = \
testsuites/htpasswd \
omhttp-auth.sh \
omhttp-basic.sh \
+ omhttp-basic-ignorecodes.sh \
omhttp-batch-fail-with-400.sh \
omhttp-batch-jsonarray-compress.sh \
omhttp-batch-jsonarray-retry.sh \
@@ -3088,6 +3091,11 @@ EXTRA_DIST = \
omhttp-batch-lokirest.sh \
omhttp-batch-lokirest-vg.sh \
omhttp-batch-newline.sh \
+ omhttp-batch-retry-metadata.sh \
+ omhttp-retry-timeout.sh \
+ omhttp-basic-ignorecodes-vg.sh \
+ omhttp-batch-retry-metadata-vg.sh \
+ omhttp-retry-timeout-vg.sh \
omhttp-retry.sh \
omhttp-httpheaderkey.sh \
omhttp-multiplehttpheaders.sh \
diff --git a/tests/diag.sh b/tests/diag.sh
index 73b93e8..f30290c 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -1718,9 +1718,9 @@ presort() {
#START: ext kafka config
#dep_cache_dir=$(readlink -f .dep_cache)
-export RS_ZK_DOWNLOAD=apache-zookeeper-3.9.1-bin.tar.gz
+export RS_ZK_DOWNLOAD=apache-zookeeper-3.9.2-bin.tar.gz
dep_cache_dir=$(pwd)/.dep_cache
-dep_zk_url=https://downloads.apache.org/zookeeper/zookeeper-3.9.1/$RS_ZK_DOWNLOAD
+dep_zk_url=https://downloads.apache.org/zookeeper/zookeeper-3.9.2/$RS_ZK_DOWNLOAD
dep_zk_cached_file=$dep_cache_dir/$RS_ZK_DOWNLOAD
export RS_KAFKA_DOWNLOAD=kafka_2.13-2.8.0.tgz
diff --git a/tests/imdtls-basic-timeout.sh b/tests/imdtls-basic-timeout.sh
index 9b4c46a..2beec15 100755
--- a/tests/imdtls-basic-timeout.sh
+++ b/tests/imdtls-basic-timeout.sh
@@ -13,7 +13,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imdtls/.libs/imdtls" )
diff --git a/tests/imdtls-basic.sh b/tests/imdtls-basic.sh
index 889caad..5d7a267 100755
--- a/tests/imdtls-basic.sh
+++ b/tests/imdtls-basic.sh
@@ -11,7 +11,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imdtls/.libs/imdtls" )
diff --git a/tests/imtcp-tls-gtls-x509fingerprint-invld.sh b/tests/imtcp-tls-gtls-x509fingerprint-invld.sh
index af33b45..7415368 100755
--- a/tests/imtcp-tls-gtls-x509fingerprint-invld.sh
+++ b/tests/imtcp-tls-gtls-x509fingerprint-invld.sh
@@ -10,7 +10,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/imtcp-tls-gtls-x509fingerprint.sh b/tests/imtcp-tls-gtls-x509fingerprint.sh
index 8cadd29..369b552 100755
--- a/tests/imtcp-tls-gtls-x509fingerprint.sh
+++ b/tests/imtcp-tls-gtls-x509fingerprint.sh
@@ -9,7 +9,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/imtcp-tls-ossl-basic-brokenhandshake-vg.sh b/tests/imtcp-tls-ossl-basic-brokenhandshake-vg.sh
index 4e2ba98..1e5d65e 100755
--- a/tests/imtcp-tls-ossl-basic-brokenhandshake-vg.sh
+++ b/tests/imtcp-tls-ossl-basic-brokenhandshake-vg.sh
@@ -14,7 +14,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/imtcp-tls-ossl-basic-stress.sh b/tests/imtcp-tls-ossl-basic-stress.sh
new file mode 100755
index 0000000..c711672
--- /dev/null
+++ b/tests/imtcp-tls-ossl-basic-stress.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+# added 2018-04-27 by alorbach
+# This file is part of the rsyslog project, released under ASL 2.0
+#
+# List available valid OpenSSL Engines for defaultopensslengine with this command:
+# openssl engine -t
+#
+. ${srcdir:=.}/diag.sh init
+export NUMMESSAGES=100000
+# uncomment for debugging support:
+#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
+#export RSYSLOG_DEBUGLOG="$RSYSLOG_DYNNAME.receiver.debuglog"
+generate_conf
+add_conf '
+global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
+ defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
+ defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
+ defaultopensslengine="rdrand"
+ debug.whitelist="on"
+ debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+)
+
+module( load="../plugins/imtcp/.libs/imtcp"
+ StreamDriver.Name="ossl"
+ StreamDriver.Mode="1"
+ StreamDriver.AuthMode="anon"
+ gnutlsPriorityString="Protocol=-ALL,TLSv1.3,TLSv1.2
+Ciphersuites=TLS_AES_256_GCM_SHA384
+"
+)
+input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port")
+
+template(name="outfmt" type="string" string="%msg:F,58:2%\n")
+:msg, contains, "msgnum:" action( type="omfile"
+ template="outfmt"
+ file=`echo $RSYSLOG_OUT_LOG`)
+
+'
+
+# SignatureAlgorithms=RSA+SHA384
+
+# Begin actual testcase
+startup
+tcpflood -p$TCPFLOOD_PORT -d8192 -m$NUMMESSAGES -Ttls -x$srcdir/tls-certs/ca.pem -Z$srcdir/tls-certs/cert.pem -z$srcdir/tls-certs/key.pem
+wait_file_lines
+shutdown_when_empty
+wait_shutdown
+seq_check
+exit_test
+
diff --git a/tests/imtcp-tls-ossl-basic-tlscommands.sh b/tests/imtcp-tls-ossl-basic-tlscommands.sh
index 6f2e760..b7d5285 100755
--- a/tests/imtcp-tls-ossl-basic-tlscommands.sh
+++ b/tests/imtcp-tls-ossl-basic-tlscommands.sh
@@ -12,7 +12,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/imtcp-tls-ossl-x509fingerprint.sh b/tests/imtcp-tls-ossl-x509fingerprint.sh
index 59167b0..d5b931b 100755
--- a/tests/imtcp-tls-ossl-x509fingerprint.sh
+++ b/tests/imtcp-tls-ossl-x509fingerprint.sh
@@ -9,7 +9,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/imtcp-tls-ossl-x509name.sh b/tests/imtcp-tls-ossl-x509name.sh
index fadd7f1..b404cb0 100755
--- a/tests/imtcp-tls-ossl-x509name.sh
+++ b/tests/imtcp-tls-ossl-x509name.sh
@@ -9,7 +9,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/imtcp-tls-ossl-x509valid.sh b/tests/imtcp-tls-ossl-x509valid.sh
index a796daa..a4c6678 100755
--- a/tests/imtcp-tls-ossl-x509valid.sh
+++ b/tests/imtcp-tls-ossl-x509valid.sh
@@ -9,7 +9,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/imtcp_conndrop_tls.sh b/tests/imtcp_conndrop_tls.sh
index 1b9e38b..ac81694 100755
--- a/tests/imtcp_conndrop_tls.sh
+++ b/tests/imtcp_conndrop_tls.sh
@@ -14,7 +14,7 @@ global( maxMessageSize="10k"
defaultNetstreamDriverKeyFile="'$srcdir'/tls-certs/key.pem"
defaultNetstreamDriver="gtls"
debug.whitelist="on"
- debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+ debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module(load="../plugins/imtcp/.libs/imtcp" maxSessions="1100"
diff --git a/tests/manytcp-too-few-tls-vg.sh b/tests/manytcp-too-few-tls-vg.sh
index b03fdb9..81e65b7 100755
--- a/tests/manytcp-too-few-tls-vg.sh
+++ b/tests/manytcp-too-few-tls-vg.sh
@@ -14,7 +14,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir'/testsuites/x.509/client-key.pem"
defaultNetstreamDriver="gtls"
debug.whitelist="on"
- debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+ debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module(load="../plugins/imtcp/.libs/imtcp" maxSessions="1100"
diff --git a/tests/omhttp-basic-ignorecodes-vg.sh b/tests/omhttp-basic-ignorecodes-vg.sh
new file mode 100755
index 0000000..2bfb5ba
--- /dev/null
+++ b/tests/omhttp-basic-ignorecodes-vg.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+export USE_VALGRIND="YES"
+source ${srcdir:=.}/omhttp-basic-ignorecodes.sh
diff --git a/tests/omhttp-basic-ignorecodes.sh b/tests/omhttp-basic-ignorecodes.sh
new file mode 100755
index 0000000..ebf1742
--- /dev/null
+++ b/tests/omhttp-basic-ignorecodes.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+# This file is part of the rsyslog project, released under ASL 2.0
+
+# Starting actual testbench
+. ${srcdir:=.}/diag.sh init
+
+export NUMMESSAGES=10000
+
+port="$(get_free_port)"
+omhttp_start_server $port --fail-with-401-or-403-after 5000
+
+generate_conf
+add_conf '
+template(name="tpl" type="string"
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
+
+module(load="../contrib/omhttp/.libs/omhttp")
+
+if $msg contains "msgnum:" then
+ action(
+ # Payload
+ name="my_http_action"
+ type="omhttp"
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
+ template="tpl"
+
+ server="localhost"
+ serverport="'$port'"
+ restpath="my/endpoint"
+ batch="off"
+ httpignorablecodes=["401", "NA", "403"]
+
+ # Auth
+ usehttps="off"
+ )
+'
+startup
+injectmsg
+shutdown_when_empty
+wait_shutdown
+omhttp_get_data $port my/endpoint
+omhttp_stop_server
+seq_check 0 4999
+exit_test
diff --git a/tests/omhttp-batch-retry-metadata-vg.sh b/tests/omhttp-batch-retry-metadata-vg.sh
new file mode 100755
index 0000000..9be8ab4
--- /dev/null
+++ b/tests/omhttp-batch-retry-metadata-vg.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+export USE_VALGRIND="YES"
+source ${srcdir:=.}/omhttp-batch-retry-metadata.sh
diff --git a/tests/omhttp-batch-retry-metadata.sh b/tests/omhttp-batch-retry-metadata.sh
new file mode 100755
index 0000000..5f2dad4
--- /dev/null
+++ b/tests/omhttp-batch-retry-metadata.sh
@@ -0,0 +1,89 @@
+#!/bin/bash
+# This file is part of the rsyslog project, released under ASL 2.0
+
+# Starting actual testbench
+. ${srcdir:=.}/diag.sh init
+
+export NUMMESSAGES=50000
+
+port="$(get_free_port)"
+omhttp_start_server $port --fail-every 100 --fail-with 207
+
+generate_conf
+add_conf '
+module(load="../contrib/omhttp/.libs/omhttp")
+
+main_queue(queue.dequeueBatchSize="2048")
+
+template(name="tpl" type="string"
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
+
+# Echo message as-is for retry
+template(name="tpl_echo" type="string" string="%msg%\n")
+
+# Echo response as-is for retry
+template(name="tpl_response" type="string" string="{ \"message\": %msg%, \"response\": %$!omhttp!response% }\n")
+
+ruleset(name="ruleset_omhttp_retry") {
+ #action(type="omfile" file="'$RSYSLOG_DYNNAME/omhttp.message.log'" template="tpl_echo")
+ # log the response
+ action(type="omfile" file="'$RSYSLOG_DYNNAME/omhttp.response.log'" template="tpl_response")
+ action(
+ name="action_omhttp"
+ type="omhttp"
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
+ template="tpl_echo"
+
+ server="localhost"
+ serverport="'$port'"
+ restpath="my/endpoint"
+ batch="on"
+ batch.maxsize="100"
+ batch.format="kafkarest"
+
+ httpretrycodes=["207","500"]
+ retry="on"
+ retry.ruleset="ruleset_omhttp_retry"
+ retry.addmetadata="on"
+
+ # Auth
+ usehttps="off"
+ ) & stop
+}
+
+ruleset(name="ruleset_omhttp") {
+ action(
+ name="action_omhttp"
+ type="omhttp"
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
+ template="tpl"
+
+ server="localhost"
+ serverport="'$port'"
+ restpath="my/endpoint"
+ batch="on"
+ batch.maxsize="100"
+ batch.format="kafkarest"
+
+ httpretrycodes=["207", "500"]
+ retry="on"
+ retry.ruleset="ruleset_omhttp_retry"
+ retry.addmetadata="on"
+
+ # Auth
+ usehttps="off"
+ ) & stop
+}
+
+if $msg contains "msgnum:" then
+ call ruleset_omhttp
+'
+startup
+injectmsg
+shutdown_when_empty
+wait_shutdown
+omhttp_get_data $port my/endpoint kafkarest
+omhttp_stop_server
+seq_check
+omhttp_validate_metadata_response
+exit_test
diff --git a/tests/omhttp-retry-timeout-vg.sh b/tests/omhttp-retry-timeout-vg.sh
new file mode 100755
index 0000000..edb7808
--- /dev/null
+++ b/tests/omhttp-retry-timeout-vg.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+export USE_VALGRIND="YES"
+source ${srcdir:=.}/omhttp-retry-timeout.sh
diff --git a/tests/omhttp-retry-timeout.sh b/tests/omhttp-retry-timeout.sh
new file mode 100755
index 0000000..38ceecd
--- /dev/null
+++ b/tests/omhttp-retry-timeout.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+# This file is part of the rsyslog project, released under ASL 2.0
+
+# Starting actual testbench
+. ${srcdir:=.}/diag.sh init
+
+export NUMMESSAGES=10000
+
+port="$(get_free_port)"
+omhttp_start_server $port --fail-every 1000 --fail-with-delay-secs 2
+
+generate_conf
+add_conf '
+module(load="../contrib/omhttp/.libs/omhttp")
+
+main_queue(queue.dequeueBatchSize="2048")
+
+template(name="tpl" type="string"
+ string="{\"msgnum\":\"%msg:F,58:2%\"}")
+
+if $msg contains "msgnum:" then
+ action(
+ # Payload
+ action.resumeRetryCount="-1"
+ action.resumeInterval="1"
+ name="my_http_action"
+ type="omhttp"
+ errorfile="'$RSYSLOG_DYNNAME/omhttp.error.log'"
+ template="tpl"
+
+ server="localhost"
+ serverport="'$port'"
+ restpath="my/endpoint"
+ restpathtimeout="1000"
+ checkpath="ping"
+ batch="off"
+
+ # Auth
+ usehttps="off"
+ )
+'
+startup
+injectmsg
+shutdown_when_empty
+wait_shutdown
+omhttp_get_data $port my/endpoint
+omhttp_stop_server
+seq_check
+exit_test
diff --git a/tests/omprog-defaults.sh b/tests/omprog-defaults.sh
index 5c52550..356c5aa 100755
--- a/tests/omprog-defaults.sh
+++ b/tests/omprog-defaults.sh
@@ -26,7 +26,8 @@ template(name="outfmt" type="string" string="%msg%\n")
:msg, contains, "msgnum:" {
action(
type="omprog"
- binary=`echo $srcdir/testsuites/omprog-defaults-bin.sh p1 p2 p3`
+ binary="'$srcdir'/testsuites/omprog-defaults-bin.sh \"p1 with spaces\"'\
+' p2 \"\" --p4=\"middle quote\" \"--p6=\"proper middle quote\"\" \"p7 is last\""
template="outfmt"
name="omprog_action"
)
@@ -37,7 +38,14 @@ injectmsg 0 10
shutdown_when_empty
wait_shutdown
-export EXPECTED="Starting with parameters: p1 p2 p3
+export EXPECTED="Starting with parameters: p1 with spaces p2 --p4=\"middle quote\" --p6=\"proper middle quote\" p7 is last
+Next parameter is \"p1 with spaces\"
+Next parameter is \"p2\"
+Next parameter is \"\"
+Next parameter is \"--p4=\"middle\"
+Next parameter is \"quote\"\"
+Next parameter is \"--p6=\"proper middle quote\"\"
+Next parameter is \"p7 is last\"
Received msgnum:00000000:
Received msgnum:00000001:
Received msgnum:00000002:
diff --git a/tests/omprog-if-error.sh b/tests/omprog-if-error.sh
index 89e035e..6d5b0de 100755
--- a/tests/omprog-if-error.sh
+++ b/tests/omprog-if-error.sh
@@ -25,6 +25,9 @@ cat $RSYSLOG_DYNNAME.othermsg
content_check 'must be terminated with \n' $RSYSLOG_DYNNAME.othermsg
export EXPECTED="Starting with parameters: p1 p2 p3
+Next parameter is \"p1\"
+Next parameter is \"p2\"
+Next parameter is \"p3\"
Received msgnum:00000000:
Received msgnum:00000001:
Received msgnum:00000002:
diff --git a/tests/sndrcv_dtls_anon_ciphers.sh b/tests/sndrcv_dtls_anon_ciphers.sh
index bac90da..4230c14 100755
--- a/tests/sndrcv_dtls_anon_ciphers.sh
+++ b/tests/sndrcv_dtls_anon_ciphers.sh
@@ -11,7 +11,7 @@ export PORT_RCVR="$(get_free_port)"
add_conf '
global(
debug.whitelist="on"
- debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+ debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imdtls/.libs/imdtls"
diff --git a/tests/sndrcv_dtls_certvalid_ciphers.sh b/tests/sndrcv_dtls_certvalid_ciphers.sh
index 93ff49f..2beaa3f 100755
--- a/tests/sndrcv_dtls_certvalid_ciphers.sh
+++ b/tests/sndrcv_dtls_certvalid_ciphers.sh
@@ -14,7 +14,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverCertFile="'$srcdir/tls-certs/cert.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imdtls/.libs/imdtls"
diff --git a/tests/sndrcv_tls_anon_ipv6.sh b/tests/sndrcv_tls_anon_ipv6.sh
index 1770b17..5f73d22 100755
--- a/tests/sndrcv_tls_anon_ipv6.sh
+++ b/tests/sndrcv_tls_anon_ipv6.sh
@@ -19,7 +19,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir'/testsuites/x.509/client-key.pem"
defaultNetstreamDriver="gtls"
debug.whitelist="on"
- debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+ debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module(load="../plugins/imtcp/.libs/imtcp" maxSessions="1100"
diff --git a/tests/sndrcv_tls_certvalid_expired.sh b/tests/sndrcv_tls_certvalid_expired.sh
index bab916c..e9f6acd 100755
--- a/tests/sndrcv_tls_certvalid_expired.sh
+++ b/tests/sndrcv_tls_certvalid_expired.sh
@@ -14,7 +14,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-key.pem'"
defaultNetstreamDriver="'$RS_TLS_DRIVER'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_certvalid_expired_defaultmode.sh b/tests/sndrcv_tls_certvalid_expired_defaultmode.sh
index 47aaa10..0b62538 100755
--- a/tests/sndrcv_tls_certvalid_expired_defaultmode.sh
+++ b/tests/sndrcv_tls_certvalid_expired_defaultmode.sh
@@ -14,7 +14,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-expired-key.pem'"
defaultNetstreamDriver="gtls"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_certvalid_revoked.sh b/tests/sndrcv_tls_certvalid_revoked.sh
index b01699e..7e6b9a5 100755
--- a/tests/sndrcv_tls_certvalid_revoked.sh
+++ b/tests/sndrcv_tls_certvalid_revoked.sh
@@ -15,7 +15,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-key.pem'"
defaultNetstreamDriver="'$RS_TLS_DRIVER'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_client_missing_cert.sh b/tests/sndrcv_tls_client_missing_cert.sh
index 7045416..aa0c320 100755
--- a/tests/sndrcv_tls_client_missing_cert.sh
+++ b/tests/sndrcv_tls_client_missing_cert.sh
@@ -14,7 +14,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-key.pem'"
defaultNetstreamDriver="'$RS_TLS_DRIVER'"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_ossl_anon_ciphers.sh b/tests/sndrcv_tls_ossl_anon_ciphers.sh
index 80201ed..cfb9ded 100755
--- a/tests/sndrcv_tls_ossl_anon_ciphers.sh
+++ b/tests/sndrcv_tls_ossl_anon_ciphers.sh
@@ -10,7 +10,7 @@ add_conf '
global(
defaultNetstreamDriver="ossl"
debug.whitelist="on"
- debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+ debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_ossl_anon_ipv4.sh b/tests/sndrcv_tls_ossl_anon_ipv4.sh
index 8bb4836..fa1a361 100755
--- a/tests/sndrcv_tls_ossl_anon_ipv4.sh
+++ b/tests/sndrcv_tls_ossl_anon_ipv4.sh
@@ -20,7 +20,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-key.pem'"
defaultNetstreamDriver="ossl"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_ossl_anon_rebind.sh b/tests/sndrcv_tls_ossl_anon_rebind.sh
index 6d7aaff..c0ac1eb 100755
--- a/tests/sndrcv_tls_ossl_anon_rebind.sh
+++ b/tests/sndrcv_tls_ossl_anon_rebind.sh
@@ -24,7 +24,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-key.pem'"
defaultNetstreamDriver="ossl"
debug.whitelist="on"
- debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+ debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_ossl_certvalid_ciphers.sh b/tests/sndrcv_tls_ossl_certvalid_ciphers.sh
index 62fd636..8b40f9c 100755
--- a/tests/sndrcv_tls_ossl_certvalid_ciphers.sh
+++ b/tests/sndrcv_tls_ossl_certvalid_ciphers.sh
@@ -12,7 +12,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
defaultNetstreamDriver="ossl"
debug.whitelist="on"
- debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+ debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_ossl_certvalid_expired.sh b/tests/sndrcv_tls_ossl_certvalid_expired.sh
index 5439acf..ade3f57 100755
--- a/tests/sndrcv_tls_ossl_certvalid_expired.sh
+++ b/tests/sndrcv_tls_ossl_certvalid_expired.sh
@@ -12,7 +12,7 @@ global(
defaultNetstreamDriverKeyFile="'$srcdir/testsuites/x.509/client-key.pem'"
defaultNetstreamDriver="ossl"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/sndrcv_tls_ossl_certvalid_tlscommand.sh b/tests/sndrcv_tls_ossl_certvalid_tlscommand.sh
index b945abe..b16fba0 100755
--- a/tests/sndrcv_tls_ossl_certvalid_tlscommand.sh
+++ b/tests/sndrcv_tls_ossl_certvalid_tlscommand.sh
@@ -11,7 +11,7 @@ global( defaultNetstreamDriverCAFile="'$srcdir/tls-certs/ca.pem'"
defaultNetstreamDriverKeyFile="'$srcdir/tls-certs/key.pem'"
defaultNetstreamDriver="ossl"
# debug.whitelist="on"
-# debug.files=["nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
+# debug.files=["net_ossl.c", "nsd_ossl.c", "tcpsrv.c", "nsdsel_ossl.c", "nsdpoll_ptcp.c", "dnscache.c"]
)
module( load="../plugins/imtcp/.libs/imtcp"
diff --git a/tests/testsuites/omprog-defaults-bin.sh b/tests/testsuites/omprog-defaults-bin.sh
index f7d43c7..3723d4d 100755
--- a/tests/testsuites/omprog-defaults-bin.sh
+++ b/tests/testsuites/omprog-defaults-bin.sh
@@ -3,6 +3,10 @@
outfile=$RSYSLOG_OUT_LOG
echo "Starting with parameters: $@" >> $outfile
+while [ $# -gt 0 ]; do
+ echo Next parameter is \""$1"\"
+ shift
+done >> $outfile
read log_line
while [[ -n "$log_line" ]]; do