summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-10-19 15:36:16 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-10-19 15:36:16 +0200
commit0acdae34bd087cca0d1a3e0f63c2b15f8655992a (patch)
tree577eef34f8e5572ddaec3d1091258e2829e456d2 /tests
parent2bf008af08cda8bd1b4c712172dd8790f0f8343e (diff)
downloadrsyslog-0acdae34bd087cca0d1a3e0f63c2b15f8655992a.tar.gz
rsyslog-0acdae34bd087cca0d1a3e0f63c2b15f8655992a.tar.xz
rsyslog-0acdae34bd087cca0d1a3e0f63c2b15f8655992a.zip
streamlined new addition to testbench
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am3
-rwxr-xr-xtests/parsertest.sh2
-rw-r--r--tests/testsuites/parse2.conf8
-rw-r--r--tests/testsuites/reallife.parse14
-rw-r--r--tests/testsuites/reallife.parse212
5 files changed, 25 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cdf2c4be..e46fb9de 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -91,6 +91,9 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \
testsuites/rfc5424-3.parse1 \
testsuites/rfc5424-4.parse1 \
testsuites/malformed.parse1 \
+ testsuites/reallife.parse1 \
+ testsuites/parse2.conf \
+ testsuites/reallife.parse2 \
testsuites/omod-if-array.conf \
testsuites/1.omod-if-array \
testsuites/1.field1 \
diff --git a/tests/parsertest.sh b/tests/parsertest.sh
index ef33256e..6cfa59b1 100755
--- a/tests/parsertest.sh
+++ b/tests/parsertest.sh
@@ -2,4 +2,6 @@ echo TEST: parsertest.sh - various parser tests
source $srcdir/diag.sh init
source $srcdir/diag.sh nettester parse1 udp
source $srcdir/diag.sh nettester parse1 tcp
+source $srcdir/diag.sh nettester parse2 udp
+source $srcdir/diag.sh nettester parse2 tcp
source $srcdir/diag.sh init
diff --git a/tests/testsuites/parse2.conf b/tests/testsuites/parse2.conf
new file mode 100644
index 00000000..04d910bc
--- /dev/null
+++ b/tests/testsuites/parse2.conf
@@ -0,0 +1,8 @@
+$ModLoad ../plugins/omstdout/.libs/omstdout
+$IncludeConfig nettest.input.conf # This picks the to be tested input from the test driver!
+
+$ErrorMessagesToStderr off
+
+# use a special format that we can easily parse in expect
+$template output,"%PRI%,%syslogfacility-text%,%syslogseverity-text%,%timestamp%,%programname%,%syslogtag%,%msg%\n"
+*.* :omstdout:;output
diff --git a/tests/testsuites/reallife.parse1 b/tests/testsuites/reallife.parse1
index bcbb7fa8..a83d2dca 100644
--- a/tests/testsuites/reallife.parse1
+++ b/tests/testsuites/reallife.parse1
@@ -10,7 +10,3 @@
# rgerhards, 2009-10-19
<29>Oct 16 20:47:24 example-p exam-pl[12345]: connect host= /192.0.2.1
29,daemon,notice,Oct 16 20:47:24,example-p,exam-pl,exam-pl[12345]:, connect host= /192.0.2.1
-<175>Oct 16 23:47:31 #001 MSWinEventLog 0#011Security#01119023582#011Fri Oct 16 16:30:44 2009#011592#011Security#011rgabcde#011User#011Success Audit#011XSXSXSN01#011Detailed Tracking#011#0112572#01119013885
-175,local5,debug,Oct 16 23:47:31,localhost,#001,#001, MSWinEventLog 0#011Security#01119023582#011Fri Oct 16 16:30:44 2009#011592#011Security#011rgabcde#011User#011Success Audit#011XSXSXSN01#011Detailed Tracking#011#0112572#01119013885
-#
-#175,local5,debug,Oct 16 23:47:31,127.0.0.1,#001,#001, MSWinEventLog 0#011Security#01119023582#011Fri Oct 16 16:30:44 2009#011592#011Security#011rgabcde#011User#011Success Audit#011XSXSXSN01#011Detailed Tracking#011#0112572#01119013885
diff --git a/tests/testsuites/reallife.parse2 b/tests/testsuites/reallife.parse2
new file mode 100644
index 00000000..c42f2526
--- /dev/null
+++ b/tests/testsuites/reallife.parse2
@@ -0,0 +1,12 @@
+# New tests should be added to this file if there is no specific
+# reason for not doing that. Initially, we could only handle one test
+# case per file, but this restriction has been removed some time ago.
+# So it is less troublesome (and easier to overlook) to have all related
+# tests in a single file.
+# This file contains a lot of real-life samples (of course mangled so
+# that they can not be traced back to the original submitter). Note
+# that IP addr 192.0.2.1 is specifically set aside for testing and
+# documentation by IANA.
+# rgerhards, 2009-10-19
+<175>Oct 16 23:47:31 #001 MSWinEventLog 0#011Security#01119023582#011Fri Oct 16 16:30:44 2009#011592#011Security#011rgabcde#011User#011Success Audit#011XSXSXSN01#011Detailed Tracking#011#0112572#01119013885
+175,local5,debug,Oct 16 23:47:31,#001,#001, MSWinEventLog 0#011Security#01119023582#011Fri Oct 16 16:30:44 2009#011592#011Security#011rgabcde#011User#011Success Audit#011XSXSXSN01#011Detailed Tracking#011#0112572#01119013885