blob: f82c6b51d5b004c7b29bf2344efe7752ea4de550 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/bin/bash
# addd 2017-10-18 by RGerhards, released under ASL 2.0
. ${srcdir:=.}/diag.sh init
generate_conf
add_conf '
module(load="../plugins/omtesting/.libs/omtesting")
module(load="../plugins/imtcp/.libs/imtcp")
input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port")
template(name="outfmt" type="string" string="%msg:F,58:2%\n")
ruleset(name="rs3" queue.type="linkedList") {
action(type="omfile" template="outfmt" file=`echo $RSYSLOG_OUT_LOG`)
}
ruleset(name="rs2" queue.type="linkedList") {
call rs3
}
ruleset(name="rs1" queue.type="linkedList") {
call rs2
:omtesting:sleep 0 1000
}
if $msg contains "msgnum:" then call rs1
'
startup
#tcpflood -p'$TCPFLOOD_PORT' -m10000
injectmsg 0 1000
shutdown_immediate
wait_shutdown
# wo do not check reception - the main point is that we do not abort. The actual
# message count is unknown (as the point is to shut down while still in processing).
exit_test
|