mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 16:50:40 +01:00
Support tools (like tcpflood) are also upgraded to support the necessary dynamic port.s This is part of the effort to make parallel testing possible. We move parts of the cleanup to the buildbot cleanup, as we cannot clean out instances on each test when we run parallel tests.
38 lines
1.3 KiB
Bash
Executable File
38 lines
1.3 KiB
Bash
Executable File
#!/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 GPLv3
|
|
# uncomment for debugging support:
|
|
echo ===============================================================================
|
|
echo \[diskqueue.sh\]: testing queue disk-only mode
|
|
# uncomment for debugging support:
|
|
#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
|
|
#export RSYSLOG_DEBUGLOG="log"
|
|
. $srcdir/diag.sh init
|
|
generate_conf
|
|
add_conf '
|
|
$ModLoad ../plugins/imtcp/.libs/imtcp
|
|
$MainMsgQueueTimeoutShutdown 10000
|
|
$InputTCPServerRun '$TCPFLOOD_PORT'
|
|
|
|
# set spool locations and switch queue to disk-only mode
|
|
$WorkDirectory test-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!
|
|
:msg, contains, "msgnum:" ?dynfile;outfmt
|
|
'
|
|
startup
|
|
# 20000 messages should be enough - the disk test is slow enough ;)
|
|
sleep 4
|
|
tcpflood -m20000
|
|
shutdown_when_empty # shut down rsyslogd when done processing messages
|
|
wait_shutdown
|
|
seq_check 0 19999
|
|
exit_test
|