789 Commits

Author SHA1 Message Date
Peter Portante
84f5608157 Fix upper and mixed case variable references
We could not reference mixed or upper case variables properly prior to
this change, as they were always lowercased before references were
pulled.

The new "option.casesensitive" for templates allows folks to turn on
variable name reference case sensitivity on a template by template
basis.
2015-12-19 16:17:11 +00:00
Peter Portante
bdc54a180e Accept leading underscores for variable names
The grammar now allows for leading underscores for variable names. This
addresses a problem stemming from the fact that the imjournal module
will create variables using the given name from systemd. All "trusted"
variables in systemd begin with a leading underscore.
2015-12-19 16:16:00 +00:00
Rainer Gerhards
e7b2749b5f Merge branch 'fix-var-cmpr' of https://github.com/portante/rsyslog into tmp 2015-12-18 15:14:32 +01:00
Rainer Gerhards
7d6151de42 testbench: add missing file to tarball 2015-12-17 15:04:13 +01:00
Thomas D
03fe5b59d0 testbench: Add missing json_null{,_array} tests to DIST target
Add the json_null{,_array} tests (with config) from commit 635a46d9bfb67d7110484709bc839cdd20a3b443 and
984c7e238b2eea7cc6db83e041fe257646b61636 to DIST target so that these files are included within the release
tarball.
2015-12-16 19:59:41 +01:00
Thomas D
409b1a2c05 Indent fix. 2015-12-16 19:48:16 +01:00
Peter Portante
903540a5b2 A simple test of variable comparisons 2015-12-16 18:34:26 +00:00
Peter Portante
a344e248c9 Tests to verify string variable comparisons 2015-12-16 18:34:26 +00:00
Peter Portante
069e12a46a Enable rscript comparison tests 2015-12-16 18:34:26 +00:00
Rainer Gerhards
6d5cef831d testbench: add test for exec_template
... under concurrency conditions. Just to make sure we don't
we got all looking right.
2015-12-11 09:20:02 +01:00
fa5a6c9f02 fix for commit #9293a1eb07235a852afe5322612fe8e37a2b96b8 2015-12-08 14:45:25 +01:00
9293a1eb07 testsuite: disabling imtcp_conndrop_tls for now as it fails sometimes
The test will fail with a sequence error most likely on slower
machines. The cause of this fail has to be fixed before enabling
the test again.
2015-12-08 14:39:32 +01:00
d782c9108b testsuite: Set sleeptime to a higher value in imptcp conndrop tests
Using 10 seconds now like in imtcp tests. Otherwise a false fail
could be generated if the machine was to slow.

closes https://github.com/rsyslog/rsyslog/issues/263
2015-12-01 15:26:26 +01:00
9187fd49b3 tcpflood: Fixed a bug in TLS handling when RandConnDrop is enabled.
The bug prevented tcpflood from reestablishing tls connections
after they were dropped. Also added an option -f to control the
random drop probability value (default = 0.95). Which means the
connection will be dropped 5% of the time.
2015-11-27 07:42:08 -08:00
6d14c8620d testsuite: Fixed imtcp_conndrop_tls tests to use TLS
Tests did not use TLS properly. Also created a configuration for
imtcp conndrop tls based on imtcp-tls-basic test.
2015-11-27 07:39:45 -08:00
Rainer Gerhards
248f3ed8f4 Merge branch 'fix-mmnorm-regex' of https://github.com/portante/rsyslog into master-candidate 2015-11-25 17:21:49 +01:00
Rainer Gerhards
c359770bf5 Merge branch 'test_fix' of https://github.com/janmejay/rsyslog into master-candidate 2015-11-25 16:41:16 +01:00
Janmejay Singh
a145542880 fixed rulebases that had no new-line after last rule, which prevents liblognorm(some versions) from loading the last rule 2015-11-25 20:21:53 +05:30
Peter Portante
9f12cfef94 Fix mmnormalize_regex failure for rule w/ noeol
Looks like at least on Fedora 21 with liblognorm 1.1.2-2, this test
fails because of the missing newline character before EOF.
2015-11-25 02:59:36 +00:00
Rainer Gerhards
67b02c17f1 testbench: fix test which used valgrind even if forbidden
Some tests used valgrind explicitely even when the configure
option forbid it's use in the testbench. This breaks, for example,
testbench runs with clang's address sanitizer.
2015-11-24 15:54:13 +01:00
Rainer Gerhards
984c7e238b testbench: add test for json arrays containing null objects 2015-11-17 11:26:42 +01:00
Rainer Gerhards
635a46d9bf testbench: add test for json null value in processing flow 2015-11-17 10:50:33 +01:00
Rainer Gerhards
2c6a75d314 testbench: temporarily disable mmnormalize test
This fails on buildbot env, but not on development machines. This
temporarily disables the test. We do this so that we can continue
to build and do other tests for mmnormalize inside the testbench.
2015-11-11 11:22:39 +01:00
Rainer Gerhards
56e8571480 Merge branch 'json-looking' into master-candidate 2015-11-11 10:27:10 +01:00
Rainer Gerhards
283096628f testbench: improve error message when content-check fails 2015-11-11 09:36:22 +01:00
Rainer Gerhards
5d7f856cc5 fix build system problem
regression from last merge
2015-11-10 19:01:52 +01:00
Rainer Gerhards
34762b4336 testbench: remove test that always fails due to problem in liblognorm
This may be restored if the unusual construct in liblognorm gets fixed.
However, this construct is replaced in liblognorm v2 by something better
(repeat), so it is not sure yet if the legacy part of liblognorm will get
a fix.
2015-11-10 18:45:20 +01:00
003ba7f003 testsuite: Added test for concurrency array message variables 2015-11-06 17:35:59 +01:00
Rainer Gerhards
4ca0d65268 testbench: add tests for msg/local variable race conditions 2015-11-03 17:07:12 +01:00
6e7a80507c testsuite: imtcp-tls-basic-vg.sh failed on Debian 7 due a bug in valgrind
The installed version of valgrind seems to have a bug which causes
memory leaks to be detected inside gnutls library.
After research I decided to disable memoryleak checking for
this specific test.
2015-10-28 07:40:54 -07:00
ae18fb23f7 testsuite: Added detection script for inotify in imfile tests
Only affects the tests using inotify, tests will be skipped when no
inotify is available.
2015-10-21 06:54:08 -07:00
Rainer Gerhards
77349efb3d fix issue with rawmsg-after-pri property
also added a testbench test
2015-10-08 14:29:57 +02:00
Janmejay Singh
3a10a78ede Fixed lookup-table reload bug, which ignored table-length of reloaded table, resulting in additional entries being invisible while looking-up (binary-search would work with old-table-length). This would be a security-issue or may cause a crash if reloaded table is actually smaller (memory access beyond table). 2015-09-30 17:29:24 +05:30
Janmejay Singh
a88d67df6e fixed re_extract bug, which fails the regex-compile for extract as fn-init fails when fn does not have exactly 2 args 2015-09-28 20:38:05 +05:30
Rainer Gerhards
f96dc1739f bugfix testbench: some tests using imptcp are run if module is disabled
Thanks to Michael Biebl for reporting this

see also https://github.com/rsyslog/rsyslog/issues/524
2015-09-17 11:55:05 +02:00
Louis Bouchard
600ddb0ce2 testbench: Fix potential buffer overflow detection
On some architectures, calculation of edLen may lead to a
negative value when the value returned by rand() is less
than extraDataLen away from RAND_MAX. The negative value
passed to memset() triggers a glibc error. Forcing the
cast of rand() to be unsigned avoid the return of a negative
value.

Closes: #506

Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
2015-09-02 14:51:09 +02:00
Rainer Gerhards
3b2de72d43 Merge branch 'master-testsuite' of https://github.com/theinric/rsyslog into master-candidate 2015-09-01 18:15:15 +02:00
Tomas Heinrich
90972a97bd testbench: remove unneeded variable and file
Both seem to have no effect.
2015-09-01 14:24:25 +02:00
Tomas Heinrich
db024a910f testbench: don't spawn interactive shells 2015-09-01 13:55:53 +02:00
Tomas Heinrich
1e5f271628 testbench: root all calls to diag.sh in srcdir
Not using srcdir breaks out-of-tree builds.
2015-09-01 13:41:11 +02:00
Tomas Heinrich
cb305a6e66 testbench: remove redundant calls to error-exit
error-exit is already called within the commands whose success is
tested.
2015-09-01 13:28:52 +02:00
Tomas Heinrich
9d2d26e631 testbench: all calls to diag.sh need to be sourced
The commands are implemented in a way which assumes they have global
side effects (e.g. exit terminating the current test). Not sourcing
the script breaks this assumption.
2015-09-01 11:42:48 +02:00
4759603f7d testbench: Added mmpstrucdata valgrind tests into makefile
Tests and config files were not included in the makefile,
so they were not added into the release tar.gz file.

closes: https://github.com/rsyslog/rsyslog/issues/484
2015-08-17 07:03:34 -07:00
f337b638e8 Merge branch 'issue_445_fix_syscall_caller_compilation' of https://github.com/karibou/rsyslog into karibou-issue_445_fix_syscall_caller_compilation
Conflicts:
	tests/imuxsock_ccmiddle.sh
	tests/imuxsock_ccmiddle_root.sh
	tests/imuxsock_hostname.sh
	tests/imuxsock_traillf.sh
	tests/imuxsock_traillf_root.sh
2015-08-04 06:11:21 -07:00
df3d4a3922 test-suite: Added !#/bin/bash into all test scripts.
Most of the tests will not work in other default shells like
on Freebsd or Solaris. So we make /bin/bash default now.
2015-07-30 15:38:17 +00:00
3b13693430 Tools: Man pages for tools were generated even with --disable-generate-man-pages
Man pages are not generated anymore when "--disable-generate-man-pages" is
configured. Also changed man-page rulepatterns makefile. The method
using $< refering to the prerequisite did not work proberly on FreeBSD.

closes https://github.com/rsyslog/rsyslog/issues/387
2015-07-24 10:21:58 +00:00
Louis Bouchard
f21b3f96f7 Fix tests bashism so the tests do run when lib enabled
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
2015-07-17 12:43:06 +02:00
Louis Bouchard
2ddc080b08 Add missing include and fix conditional logic
Once the config.h is included, the conditional compilation is wrong
and needs to be fixed

Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
2015-07-17 12:39:00 +02:00
Louis Bouchard
647b116c2c Revert missing options in comment
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
2015-07-16 18:09:05 +02:00
Louis Bouchard
d5540ae094 Skip tests that require liblogging-stdlog
Those tests were enhanced with the addition of liblogging-stdlog
features. When compiled without it, most of the test will fail.
Skip those.

Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
2015-07-16 17:30:57 +02:00