mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 12:10:46 +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.
41 lines
1.3 KiB
Bash
Executable File
41 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Test for disk-only queue mode (with fsync for queue files)
|
|
# 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-06-09 by Rgerhards
|
|
# This file is part of the rsyslog project, released under GPLv3
|
|
# uncomment for debugging support:
|
|
echo \[diskqueue-fsync.sh\]: testing queue disk-only mode, fsync case
|
|
|
|
uname
|
|
if [ `uname` = "SunOS" ] ; then
|
|
echo "This test currently does not work on all flavors of Solaris."
|
|
exit 77
|
|
fi
|
|
|
|
. $srcdir/diag.sh init
|
|
generate_conf
|
|
add_conf '
|
|
$ModLoad ../plugins/imtcp/.libs/imtcp
|
|
$InputTCPServerRun '$TCPFLOOD_PORT'
|
|
|
|
# set spool locations and switch queue to disk-only mode
|
|
$WorkDirectory test-spool
|
|
$MainMsgQueueSyncQueueFiles on
|
|
$MainMsgQueueTimeoutShutdown 10000
|
|
$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
|
|
# 1000 messages should be enough - the disk fsync test is very slow!
|
|
. $srcdir/diag.sh injectmsg 0 1000
|
|
shutdown_when_empty # shut down rsyslogd when done processing messages
|
|
wait_shutdown
|
|
seq_check 0 999
|
|
exit_test
|