summaryrefslogtreecommitdiffstats
path: root/tests/execonlywhenprevsuspended2.sh
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-06-24 12:13:48 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-06-24 12:13:48 +0200
commit31fae7b93d7aa94b7b3fcbfdf101328230ea6302 (patch)
treee9efcb9247dcd1142831c14e81652e67f03bd043 /tests/execonlywhenprevsuspended2.sh
parentf48128f34a17aae7e7b9405fe32b396db45443ca (diff)
downloadrsyslog-31fae7b93d7aa94b7b3fcbfdf101328230ea6302.tar.gz
rsyslog-31fae7b93d7aa94b7b3fcbfdf101328230ea6302.tar.xz
rsyslog-31fae7b93d7aa94b7b3fcbfdf101328230ea6302.zip
bugfix: "$ActionExecOnlyWhenPreviousIsSuspended on" was broken
Note that, as it looks, the directive was already broken in previous v5 versions. So while I solved what looked like a (intentional) regression from the performance tuning, I actually solved a previous regression as well ;) I have also added new test cases to the testbench in order to capture such problems in the future. This version does now look pretty good in shape.
Diffstat (limited to 'tests/execonlywhenprevsuspended2.sh')
-rwxr-xr-xtests/execonlywhenprevsuspended2.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/execonlywhenprevsuspended2.sh b/tests/execonlywhenprevsuspended2.sh
new file mode 100755
index 00000000..8af1b4d8
--- /dev/null
+++ b/tests/execonlywhenprevsuspended2.sh
@@ -0,0 +1,17 @@
+# we test the execonly if previous is suspended directive. For this,
+# we have an action that is suspended for all messages but the second.
+# we write two files: one only if the output is suspended and the other one
+# in all cases. This should thouroughly check the logic involved.
+# rgerhards, 2010-06-23
+echo ===============================================================================
+echo \[execonlywhenprevsuspended2.sh\]: test execonly...suspended functionality
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup execonlywhenprevsuspended2.conf
+source $srcdir/diag.sh injectmsg 0 1000
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh wait-shutdown
+echo check file 1
+source $srcdir/diag.sh seq-check 1 999
+echo check file 2
+source $srcdir/diag.sh seq-check2 0 999
+source $srcdir/diag.sh exit