From dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 18:28:20 +0200 Subject: Adding upstream version 8.2402.0. Signed-off-by: Daniel Baumann --- tests/diskqueue.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 tests/diskqueue.sh (limited to 'tests/diskqueue.sh') diff --git a/tests/diskqueue.sh b/tests/diskqueue.sh new file mode 100755 index 0000000..d7868f2 --- /dev/null +++ b/tests/diskqueue.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Test for disk-only queue mode +# This test checks if queue files can be correctly written +# and read back, but it does not test the transition from +# memory to disk mode for DA queues. +# added 2009-04-17 by Rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +. ${srcdir:=.}/diag.sh init +export NUMMESSAGES=20000 +export QUEUE_EMPTY_CHECK_FUNC=wait_file_lines +generate_conf +add_conf ' +# set spool locations and switch queue to disk-only mode +$WorkDirectory '$RSYSLOG_DYNNAME'.spool +$MainMsgQueueFilename mainq +$MainMsgQueueType disk + +$template outfmt,"%msg:F,58:2%\n" +template(name="dynfile" type="string" string=`echo $RSYSLOG_OUT_LOG`) # trick to use relative path names! +if ($msg contains "msgnum:") then + ?dynfile;outfmt +else + action(type="omfile" file="'$RSYSLOG_DYNNAME.syslog.log'") +' +startup +injectmsg +shutdown_when_empty +wait_shutdown +seq_check +check_not_present "spool.* open error" $RSYSLOG_DYNNAME.syslog.log +exit_test -- cgit v1.2.3