summaryrefslogtreecommitdiffstats
path: root/tests/mainq_actq_DA.sh
blob: 88f4a72fd18499c56191b59410f49c1950a4f743 (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
#!/bin/bash
# Test to check that mainq and actionq can be disk assisted without
# any problems. This was created to reproduce a segfault issue:
# https://github.com/rsyslog/rsyslog/issues/3681
# added 2019-06-03 by rgerhards
# This file is part of the rsyslog project, released  under ASL 2.0
. ${srcdir:=.}/diag.sh init
export NUMMESSAGES=10	# we just need a handful - we primarily test startup
generate_conf
add_conf '
global(workDirectory="'${RSYSLOG_DYNNAME}'.spool")
main_queue(queue.fileName="main" queue.type="LinkedList")

template(name="outfmt" type="string" string="%msg:F,58:2%\n")
:msg, contains, "msgnum:"
	action(type="omfile" file="'$RSYSLOG_OUT_LOG'" template="outfmt"
		queue.type="linkedList" queue.fileName="action")
'
startup
injectmsg
shutdown_when_empty
wait_shutdown 
seq_check
exit_test