diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
commit | dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch) | |
tree | 66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/imptcp-discard-truncated-msg.sh | |
parent | Initial commit. (diff) | |
download | rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip |
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | tests/imptcp-discard-truncated-msg.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/imptcp-discard-truncated-msg.sh b/tests/imptcp-discard-truncated-msg.sh new file mode 100755 index 0000000..a734b4b --- /dev/null +++ b/tests/imptcp-discard-truncated-msg.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# addd 2016-05-13 by RGerhards, released under ASL 2.0 + +. ${srcdir:=.}/diag.sh init +generate_conf +add_conf ' +$MaxMessageSize 128 +global(processInternalMessages="on") +module(load="../plugins/imptcp/.libs/imptcp") +input(type="imptcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port" + ruleset="ruleset1" discardTruncatedMsg="on") + +template(name="outfmt" type="string" string="%rawmsg%\n") +ruleset(name="ruleset1") { + action(type="omfile" template="outfmt" file=`echo $RSYSLOG_OUT_LOG`) +} +' +startup +assign_tcpflood_port $RSYSLOG_DYNNAME.tcpflood_port +tcpflood -m1 -M "\"<120> 2011-03-01T11:22:12Z host tag: this is a way to long message that has abcdefghijklmnopqrstuvwxyz test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16\"" +tcpflood -m1 -M "\"<120> 2011-03-01T11:22:12Z host tag: this is a way to long message\"" +tcpflood -m1 -M "\"<120> 2011-03-01T11:22:12Z host tag: this is a way to long message that has abcdefghijklmnopqrstuvwxyz test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16\"" +tcpflood -m1 -M "\"<120> 2011-03-01T11:22:12Z host tag: this is a way to long message\"" +shutdown_when_empty +wait_shutdown + +export EXPECTED='<120> 2011-03-01T11:22:12Z host tag: this is a way to long message that has abcdefghijklmnopqrstuvwxyz test1 test2 test3 test4 t +<120> 2011-03-01T11:22:12Z host tag: this is a way to long message +<120> 2011-03-01T11:22:12Z host tag: this is a way to long message that has abcdefghijklmnopqrstuvwxyz test1 test2 test3 test4 t +<120> 2011-03-01T11:22:12Z host tag: this is a way to long message' +cmp_exact +exit_test |