summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-25 15:23:39 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-25 15:23:39 +0100
commitd102aab886fcde914677146caf20bd68ca41bfff (patch)
tree550478d831ac685c58a6dd16bba3f49898054907 /tests
parent841f841ce12e49659966db006f3f244e1f23b70e (diff)
downloadrsyslog-d102aab886fcde914677146caf20bd68ca41bfff.tar.gz
rsyslog-d102aab886fcde914677146caf20bd68ca41bfff.tar.xz
rsyslog-d102aab886fcde914677146caf20bd68ca41bfff.zip
new feature: $OMFileAsyncWriting directive added
it permits to specifiy if asynchronous writing should be done or not
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am18
-rwxr-xr-xtests/diag.sh3
-rwxr-xr-xtests/dynfile_cachemiss.sh (renamed from tests/dynfile_invalid.sh)4
-rwxr-xr-xtests/dynfile_invld_async.sh2
-rwxr-xr-xtests/dynfile_invld_sync.sh2
-rw-r--r--tests/testsuites/asynwr_deadlock.conf1
-rw-r--r--tests/testsuites/asynwr_deadlock2.conf1
-rw-r--r--tests/testsuites/asynwr_deadlock4.conf1
-rw-r--r--tests/testsuites/asynwr_simple.conf1
-rw-r--r--tests/testsuites/asynwr_small.conf1
-rw-r--r--tests/testsuites/asynwr_timeout.conf1
-rw-r--r--tests/testsuites/asynwr_tinybuf.conf1
-rw-r--r--tests/testsuites/dynfile_cachemiss.conf (renamed from tests/testsuites/dynfile_invalid.conf)2
-rw-r--r--tests/testsuites/wr_large.conf (renamed from tests/testsuites/asynwr_large.conf)1
-rwxr-xr-xtests/wr_large.sh (renamed from tests/asynwr_large.sh)8
-rwxr-xr-xtests/wr_large_async.sh14
-rwxr-xr-xtests/wr_large_sync.sh14
17 files changed, 59 insertions, 16 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9e04ea1e..0b1ccb4b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -13,13 +13,15 @@ TESTS = $(TESTRUNS) cfg.sh \
asynwr_timeout.sh \
asynwr_small.sh \
asynwr_tinybuf.sh \
- asynwr_large.sh \
+ wr_large_async.sh \
+ wr_large_sync.sh \
asynwr_deadlock.sh \
asynwr_deadlock2.sh \
asynwr_deadlock4.sh \
gzipwr_large.sh \
gzipwr_large_dynfile.sh \
- dynfile_invalid.sh \
+ dynfile_invld_async.sh \
+ dynfile_invld_sync.sh \
dynfile_invalid2.sh \
complex1.sh \
queue-persist.sh \
@@ -163,8 +165,10 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/asynwr_small.conf \
asynwr_tinybuf.sh \
testsuites/asynwr_tinybuf.conf \
- asynwr_large.sh \
- testsuites/asynwr_large.conf \
+ wr_large_async.sh \
+ wr_large_sync.sh \
+ wr_large.sh \
+ testsuites/wr_large.conf \
asynwr_deadlock.sh \
testsuites/asynwr_deadlock.conf \
asynwr_deadlock2.sh \
@@ -177,8 +181,10 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/gzipwr_large_dynfile.conf \
complex1.sh \
testsuites/complex1.conf \
- dynfile_invalid.sh \
- testsuites/dynfile_invalid.conf \
+ dynfile_invld_async.sh \
+ dynfile_invld_sync.sh \
+ dynfile_cachemiss.sh \
+ testsuites/dynfile_cachemiss.conf \
dynfile_invalid2.sh \
testsuites/dynfile_invalid2.conf \
proprepltest.sh \
diff --git a/tests/diag.sh b/tests/diag.sh
index 27b60582..8f268a5e 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -16,6 +16,7 @@ case $1 in
'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
cp $srcdir/testsuites/diag-common.conf diag-common.conf
cp $srcdir/testsuites/diag-common2.conf diag-common2.conf
+ rm -f rsyslog.action.*.include
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
@@ -25,7 +26,7 @@ case $1 in
mkdir test-spool
;;
'exit') rm -f rsyslogd.started work-*.conf diag-common.conf
- rm -f rsyslogd2.started diag-common2.conf
+ rm -f rsyslogd2.started diag-common2.conf rsyslog.action.*.include
rm -f work rsyslog.out.log rsyslog.out.log.save # common work files
rm -f rsyslog.out.*.log
rm -rf test-spool
diff --git a/tests/dynfile_invalid.sh b/tests/dynfile_cachemiss.sh
index 6c792db1..6e2d9cca 100755
--- a/tests/dynfile_invalid.sh
+++ b/tests/dynfile_cachemiss.sh
@@ -6,12 +6,12 @@
#
# This file is part of the rsyslog project, released under GPLv3
echo ===============================================================================
-echo TEST: \[dynfile_invalid.sh\]: test open fail for dynafiles
+echo TEST: \[dynfile_cachemiss.sh\]: test open fail for dynafiles with `cat rsyslog.action.1.include`
source $srcdir/diag.sh init
# uncomment for debugging support:
#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
#export RSYSLOG_DEBUGLOG="log"
-source $srcdir/diag.sh startup dynfile_invalid.conf
+source $srcdir/diag.sh startup dynfile_cachemiss.conf
# we send handcrafted message. We have a dynafile cache of 4, and now send one message
# each to fill up the cache.
./tcpflood -m1 -M "<129>Mar 10 01:00:00 172.20.245.8 tag msg:rsyslog.out.0.log:0"
diff --git a/tests/dynfile_invld_async.sh b/tests/dynfile_invld_async.sh
new file mode 100755
index 00000000..3c9b2045
--- /dev/null
+++ b/tests/dynfile_invld_async.sh
@@ -0,0 +1,2 @@
+echo "\$OMFileAsyncWriting on" > rsyslog.action.1.include
+source $srcdir/dynfile_cachemiss.sh
diff --git a/tests/dynfile_invld_sync.sh b/tests/dynfile_invld_sync.sh
new file mode 100755
index 00000000..cc6b6451
--- /dev/null
+++ b/tests/dynfile_invld_sync.sh
@@ -0,0 +1,2 @@
+echo "\$OMFileAsyncWriting off" > rsyslog.action.1.include
+source $srcdir/dynfile_cachemiss.sh
diff --git a/tests/testsuites/asynwr_deadlock.conf b/tests/testsuites/asynwr_deadlock.conf
index d703791a..dc4045b0 100644
--- a/tests/testsuites/asynwr_deadlock.conf
+++ b/tests/testsuites/asynwr_deadlock.conf
@@ -10,4 +10,5 @@ $template outfmt,"%msg:F,58:2%\n"
$OMFileFlushOnTXEnd on
$OMFileFlushInterval 10
$OMFileFlushIOBufferSize 10k
+$OMFileAsyncWriting on
:msg, contains, "msgnum:" ./rsyslog.out.log;outfmt
diff --git a/tests/testsuites/asynwr_deadlock2.conf b/tests/testsuites/asynwr_deadlock2.conf
index c3eecae3..07811613 100644
--- a/tests/testsuites/asynwr_deadlock2.conf
+++ b/tests/testsuites/asynwr_deadlock2.conf
@@ -11,5 +11,6 @@ $template dynfile,"rsyslog.out.%msg:F,58:2%.log" # use multiple dynafiles
$OMFileFlushOnTXEnd on
$OMFileFlushInterval 10
$OMFileIOBufferSize 10k
+$OMFileAsyncWriting on
$DynaFileCacheSize 4
local0.* ?dynfile;outfmt
diff --git a/tests/testsuites/asynwr_deadlock4.conf b/tests/testsuites/asynwr_deadlock4.conf
index 23ce3cfc..f4308ff1 100644
--- a/tests/testsuites/asynwr_deadlock4.conf
+++ b/tests/testsuites/asynwr_deadlock4.conf
@@ -11,5 +11,6 @@ $template dynfile,"rsyslog.out.log" # use multiple dynafiles
$OMFileFlushOnTXEnd on
$OMFileFlushInterval 10
$OMFileIOBufferSize 10k
+$OMFileAsyncWriting on
$DynaFileCacheSize 4
local0.* ?dynfile;outfmt
diff --git a/tests/testsuites/asynwr_simple.conf b/tests/testsuites/asynwr_simple.conf
index 68b85ff5..44b03f2b 100644
--- a/tests/testsuites/asynwr_simple.conf
+++ b/tests/testsuites/asynwr_simple.conf
@@ -11,4 +11,5 @@ $template dynfile,"rsyslog.out.log" # trick to use relative path names!
$OMFileFlushOnTXEnd off
$OMFileFlushInterval 2
$OMFileFlushIOBufferSize 10k
+$OMFileAsyncWriting on
:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/asynwr_small.conf b/tests/testsuites/asynwr_small.conf
index d9724cec..f04ce962 100644
--- a/tests/testsuites/asynwr_small.conf
+++ b/tests/testsuites/asynwr_small.conf
@@ -10,4 +10,5 @@ $template outfmt,"%msg:F,58:2%\n"
$template dynfile,"rsyslog.out.log" # trick to use relative path names!
$OMFileFlushOnTXEnd off
$OMFileFlushInterval 2
+$OMFileAsyncWriting on
:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/asynwr_timeout.conf b/tests/testsuites/asynwr_timeout.conf
index 68b85ff5..44b03f2b 100644
--- a/tests/testsuites/asynwr_timeout.conf
+++ b/tests/testsuites/asynwr_timeout.conf
@@ -11,4 +11,5 @@ $template dynfile,"rsyslog.out.log" # trick to use relative path names!
$OMFileFlushOnTXEnd off
$OMFileFlushInterval 2
$OMFileFlushIOBufferSize 10k
+$OMFileAsyncWriting on
:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/asynwr_tinybuf.conf b/tests/testsuites/asynwr_tinybuf.conf
index 9818b139..01dec4d8 100644
--- a/tests/testsuites/asynwr_tinybuf.conf
+++ b/tests/testsuites/asynwr_tinybuf.conf
@@ -11,4 +11,5 @@ $template dynfile,"rsyslog.out.log" # trick to use relative path names!
$OMFileFlushOnTXEnd off
$OMFileFlushInterval 2
$OMFileIOBufferSize 1
+$OMFileAsyncWriting on
:msg, contains, "msgnum:" ?dynfile;outfmt
diff --git a/tests/testsuites/dynfile_invalid.conf b/tests/testsuites/dynfile_cachemiss.conf
index 458f199b..273ff176 100644
--- a/tests/testsuites/dynfile_invalid.conf
+++ b/tests/testsuites/dynfile_cachemiss.conf
@@ -10,5 +10,5 @@ $template outfmt,"%msg:F,58:3%\n"
$template dynfile,"%msg:F,58:2%.log" # complete name is in message
$OMFileFlushOnTXEnd on
$DynaFileCacheSize 4
-$omfileFlushInterval 1
+$IncludeConfig rsyslog.action.1.include
local0.* ?dynfile;outfmt
diff --git a/tests/testsuites/asynwr_large.conf b/tests/testsuites/wr_large.conf
index de41bc43..b64f132b 100644
--- a/tests/testsuites/asynwr_large.conf
+++ b/tests/testsuites/wr_large.conf
@@ -12,4 +12,5 @@ $template dynfile,"rsyslog.out.log" # trick to use relative path names!
$OMFileFlushOnTXEnd off
$OMFileFlushInterval 2
$OMFileIOBufferSize 256k
+$IncludeConfig rsyslog.action.1.include
local0.* ?dynfile;outfmt
diff --git a/tests/asynwr_large.sh b/tests/wr_large.sh
index 158fd80b..84f12989 100755
--- a/tests/asynwr_large.sh
+++ b/tests/wr_large.sh
@@ -4,13 +4,9 @@
# added 2010-03-10 by Rgerhards
#
# This file is part of the rsyslog project, released under GPLv3
-echo ===============================================================================
-echo TEST: \[asynwr_large.sh\]: test for async file writing for large message sets
+cat rsyslog.action.1.include
source $srcdir/diag.sh init
-# uncomment for debugging support:
-#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
-#export RSYSLOG_DEBUGLOG="log"
-source $srcdir/diag.sh startup asynwr_large.conf
+source $srcdir/diag.sh startup wr_large.conf
# send 4000 messages of 10.000bytes plus header max, randomized
source $srcdir/diag.sh tcpflood -m4000 -r -d10000 -P129
sleep 1 # due to large messages, we need this time for the tcp receiver to settle...
diff --git a/tests/wr_large_async.sh b/tests/wr_large_async.sh
new file mode 100755
index 00000000..88a1acf8
--- /dev/null
+++ b/tests/wr_large_async.sh
@@ -0,0 +1,14 @@
+# This tests async writing large data records. We use up to 10K
+# record size.
+
+# added 2010-03-10 by Rgerhards
+#
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo TEST: \[wr_large_async.sh\]: test for file writing for large message sets
+source $srcdir/diag.sh init
+# uncomment for debugging support:
+#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
+#export RSYSLOG_DEBUGLOG="log"
+echo "\$OMFileAsyncWriting on" > rsyslog.action.1.include
+source $srcdir/wr_large.sh
diff --git a/tests/wr_large_sync.sh b/tests/wr_large_sync.sh
new file mode 100755
index 00000000..a1c4fd77
--- /dev/null
+++ b/tests/wr_large_sync.sh
@@ -0,0 +1,14 @@
+# This tests async writing large data records. We use up to 10K
+# record size.
+
+# added 2010-03-10 by Rgerhards
+#
+# This file is part of the rsyslog project, released under GPLv3
+echo ===============================================================================
+echo TEST: \[wr_large_sync.sh\]: test for file writing for large message sets
+source $srcdir/diag.sh init
+# uncomment for debugging support:
+#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
+#export RSYSLOG_DEBUGLOG="log"
+echo "\$OMFileAsyncWriting off" > rsyslog.action.1.include
+source $srcdir/wr_large.sh