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/random.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/random.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/random.sh b/tests/random.sh new file mode 100755 index 0000000..b074142 --- /dev/null +++ b/tests/random.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Test if rsyslog survives sending truly random data to it... +# +# added 2010-04-01 by Rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +. ${srcdir:=.}/diag.sh init +generate_conf +add_conf ' +# The random data will generate TCP framing error messages. We will +# not clutter the test output with them. So we disable error messages +# to stderr. +$ErrorMessagesToStderr off + +module(load="../plugins/imtcp/.libs/imtcp") +input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port") + +$template outfmt,"%rawmsg%\n" +template(name="dynfile" type="string" string=`echo $RSYSLOG_OUT_LOG`) # trick to use relative path names! +*.* /dev/null +' +startup +# generate random data +./randomgen -f $RSYSLOG_DYNNAME.random.data -s 100000 +ls -l $RSYSLOG_DYNNAME.random.data +tcpflood -B -I $RSYSLOG_DYNNAME.random.data -c5 -C10 +shutdown_when_empty # shut down rsyslogd when done processing messages +wait_shutdown # and wait for it to terminate +# we do not check anything yet, the point is if rsyslog survived ;) +# TODO: check for exit message, but we'll notice an abort anyhow, so not that important +exit_test |