mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-13 04:50:41 +01:00
extended testbench: tests for $CreateDirs
This commit is contained in:
parent
8b9132bc32
commit
6598615e5b
@ -1,5 +1,8 @@
|
||||
---------------------------------------------------------------------------
|
||||
Version 5.5.2 [DEVEL] (rgerhards), 2009-11-??
|
||||
- extended testbench
|
||||
- bugfix: $CreateDirs variable not properly initialized, default thus
|
||||
was random (but most often "on") [imported from v3]
|
||||
---------------------------------------------------------------------------
|
||||
Version 5.5.1 [DEVEL] (rgerhards), 2009-11-27
|
||||
- introduced the ablity for netstream drivers to utilize an epoll interface
|
||||
|
||||
@ -20,6 +20,8 @@ TESTS = $(TESTRUNS) cfg.sh \
|
||||
queue-persist.sh \
|
||||
pipeaction.sh \
|
||||
execonlyonce.sh \
|
||||
dircreate_dflt.sh \
|
||||
dircreate_off.sh \
|
||||
queue-persist.sh
|
||||
|
||||
if ENABLE_OMUDPSPOOF
|
||||
@ -202,6 +204,10 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
|
||||
tabescape_off.sh \
|
||||
testsuites/tabescape_off.conf \
|
||||
testsuites/1.tabescape_off \
|
||||
dircreate_dflt.sh \
|
||||
testsuites/dircreate_dflt.conf \
|
||||
dircreate_off.sh \
|
||||
testsuites/dircreate_off.conf \
|
||||
DiagTalker.java \
|
||||
cfg.sh
|
||||
|
||||
|
||||
@ -18,14 +18,14 @@ case $1 in
|
||||
rm -f rsyslogd.started work-*.conf
|
||||
rm -f rsyslogd2.started work-*.conf
|
||||
rm -f work rsyslog.out.log rsyslog.out.log.save # common work files
|
||||
rm -rf test-spool
|
||||
rm -rf test-spool test-logdir
|
||||
rm -f core.* vgcore.*
|
||||
mkdir test-spool
|
||||
;;
|
||||
'exit') rm -f rsyslogd.started work-*.conf diag-common.conf
|
||||
rm -f rsyslogd2.started diag-common2.conf
|
||||
rm -f work rsyslog.out.log rsyslog.out.log.save # common work files
|
||||
rm -rf test-spool
|
||||
rm -rf test-spool test-logdir
|
||||
echo -------------------------------------------------------------------------------
|
||||
;;
|
||||
'startup') # start rsyslogd with default params. $2 is the config file name to use
|
||||
|
||||
20
tests/dircreate_dflt.sh
Executable file
20
tests/dircreate_dflt.sh
Executable file
@ -0,0 +1,20 @@
|
||||
# Test for automatic creation of dynafile directories
|
||||
# note that we use the "test-spool" directory, because it is handled by diag.sh
|
||||
# in any case, so we do not need to add any extra new test dir.
|
||||
# added 2009-11-30 by Rgerhards
|
||||
# This file is part of the rsyslog project, released under GPLv3
|
||||
# uncomment for debugging support:
|
||||
echo ===================================================================================
|
||||
echo \[dircreate_dflt_dflt.sh\]: testing automatic directory creation for dynafiles - default
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup dircreate_dflt.conf
|
||||
source $srcdir/diag.sh injectmsg 0 1 # a single message is sufficient
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown
|
||||
if [ ! -e test-logdir/rsyslog.out.log ]
|
||||
then
|
||||
echo "test-logdir or logfile not created!"
|
||||
exit 1
|
||||
fi
|
||||
exit
|
||||
source $srcdir/diag.sh exit
|
||||
20
tests/dircreate_off.sh
Executable file
20
tests/dircreate_off.sh
Executable file
@ -0,0 +1,20 @@
|
||||
# Test for automatic creation of dynafile directories
|
||||
# note that we use the "test-spool" directory, because it is handled by diag.sh
|
||||
# in any case, so we do not need to add any extra new test dir.
|
||||
# added 2009-11-30 by Rgerhards
|
||||
# This file is part of the rsyslog project, released under GPLv3
|
||||
# uncomment for debugging support:
|
||||
echo ===================================================================================
|
||||
echo \[dircreate_off_off.sh\]: testing automatic directory creation for dynafiles - default
|
||||
source $srcdir/diag.sh init
|
||||
source $srcdir/diag.sh startup dircreate_off.conf
|
||||
source $srcdir/diag.sh injectmsg 0 1 # a single message is sufficient
|
||||
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
||||
source $srcdir/diag.sh wait-shutdown
|
||||
if [ -e test-logdir/rsyslog.out.log ]
|
||||
then
|
||||
echo "test-logdir or logfile WAS created where not permitted to!"
|
||||
exit 1
|
||||
fi
|
||||
exit
|
||||
source $srcdir/diag.sh exit
|
||||
11
tests/testsuites/dircreate_dflt.conf
Normal file
11
tests/testsuites/dircreate_dflt.conf
Normal file
@ -0,0 +1,11 @@
|
||||
# see .sh file for description
|
||||
# rgerhards, 2009-11-30
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
# set spool locations and switch queue to disk-only mode
|
||||
$WorkDirectory test-spool
|
||||
$MainMsgQueueFilename mainq
|
||||
$MainMsgQueueType disk
|
||||
|
||||
$template dynfile,"test-logdir/rsyslog.out.log" # trick to use relative path names!
|
||||
*.* ?dynfile
|
||||
12
tests/testsuites/dircreate_off.conf
Normal file
12
tests/testsuites/dircreate_off.conf
Normal file
@ -0,0 +1,12 @@
|
||||
# see .sh file for description
|
||||
# rgerhards, 2009-11-30
|
||||
$IncludeConfig diag-common.conf
|
||||
|
||||
# set spool locations and switch queue to disk-only mode
|
||||
$WorkDirectory test-spool
|
||||
$MainMsgQueueFilename mainq
|
||||
$MainMsgQueueType disk
|
||||
|
||||
$CreateDirs off
|
||||
$template dynfile,"test-logdir/rsyslog.out.log" # trick to use relative path names!
|
||||
*.* ?dynfile
|
||||
Loading…
x
Reference in New Issue
Block a user