summaryrefslogtreecommitdiffstats
path: root/tests/testsuites
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/testsuites
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/testsuites')
-rw-r--r--tests/testsuites/execonlywhenprevsuspended.conf13
-rw-r--r--tests/testsuites/execonlywhenprevsuspended2.conf19
-rw-r--r--tests/testsuites/execonlywhenprevsuspended3.conf18
-rw-r--r--tests/testsuites/execonlywhenprevsuspended4.conf15
4 files changed, 65 insertions, 0 deletions
diff --git a/tests/testsuites/execonlywhenprevsuspended.conf b/tests/testsuites/execonlywhenprevsuspended.conf
new file mode 100644
index 00000000..04dc6b59
--- /dev/null
+++ b/tests/testsuites/execonlywhenprevsuspended.conf
@@ -0,0 +1,13 @@
+# See main .sh file for info
+# rgerhards, 2010-06-23
+$IncludeConfig diag-common.conf
+
+# omtesting provides the ability to cause "SUSPENDED" action state
+$ModLoad ../plugins/omtesting/.libs/omtesting
+
+$MainMsgQueueTimeoutShutdown 100000
+$template outfmt,"%msg:F,58:2%\n"
+
+:msg, contains, "msgnum:" :omtesting:fail 2 0
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log;outfmt
diff --git a/tests/testsuites/execonlywhenprevsuspended2.conf b/tests/testsuites/execonlywhenprevsuspended2.conf
new file mode 100644
index 00000000..86aa8832
--- /dev/null
+++ b/tests/testsuites/execonlywhenprevsuspended2.conf
@@ -0,0 +1,19 @@
+# See main .sh file for info
+# rgerhards, 2010-06-23
+$IncludeConfig diag-common.conf
+
+# omtesting provides the ability to cause "SUSPENDED" action state
+$ModLoad ../plugins/omtesting/.libs/omtesting
+
+$MainMsgQueueTimeoutShutdown 100000
+$template outfmt,"%msg:F,58:2%\n"
+
+:msg, contains, "msgnum:" :omtesting:fail 2 0
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log;outfmt
+# note that we MUST re-set PrevSusp, else it will remain active
+# for all other actions as well (this tells us how bad the current
+# config language is...). -- rgerhards, 2010-06-24
+$ActionExecOnlyWhenPreviousIsSuspended off
+
+:msg, contains, "msgnum:" ./rsyslog2.out.log;outfmt
diff --git a/tests/testsuites/execonlywhenprevsuspended3.conf b/tests/testsuites/execonlywhenprevsuspended3.conf
new file mode 100644
index 00000000..d2750e9a
--- /dev/null
+++ b/tests/testsuites/execonlywhenprevsuspended3.conf
@@ -0,0 +1,18 @@
+# See main .sh file for info
+# rgerhards, 2010-06-23
+$IncludeConfig diag-common.conf
+
+# omtesting provides the ability to cause "SUSPENDED" action state
+$ModLoad ../plugins/omtesting/.libs/omtesting
+
+$MainMsgQueueTimeoutShutdown 100000
+$template outfmt,"%msg:F,58:2%\n"
+
+:msg, contains, "msgnum:" :omtesting:fail 2 0
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log;outfmt
+# note that we MUST re-set PrevSusp, else it will remain active
+# for all other actions as well (this tells us how bad the current
+# config language is...). -- rgerhards, 2010-06-24
+$ActionExecOnlyWhenPreviousIsSuspended off
+& ./rsyslog2.out.log;outfmt
diff --git a/tests/testsuites/execonlywhenprevsuspended4.conf b/tests/testsuites/execonlywhenprevsuspended4.conf
new file mode 100644
index 00000000..04bc3805
--- /dev/null
+++ b/tests/testsuites/execonlywhenprevsuspended4.conf
@@ -0,0 +1,15 @@
+# See main .sh file for info
+# rgerhards, 2010-06-23
+$IncludeConfig diag-common.conf
+
+# omtesting provides the ability to cause "SUSPENDED" action state
+$ModLoad ../plugins/omtesting/.libs/omtesting
+
+$MainMsgQueueTimeoutShutdown 100000
+$template outfmt,"%msg:F,58:2%\n"
+
+:msg, contains, "msgnum:" :omtesting:fail 2 0
+$ActionExecOnlyWhenPreviousIsSuspended on
+& ./rsyslog.out.log;outfmt
+# note that $ActionExecOnlyWhenPreviousIsSuspended on is still active!
+& ./rsyslog2.out.log;outfmt