1479 Commits

Author SHA1 Message Date
Harshvardhan Shrivastava
c9720547d9 merge master 2018-03-27 14:10:50 +05:30
Rainer Gerhards
db5541a8db
Merge pull request #1992 from jsiwrk/feature/omprog_feedback_tests
omprog: added tests for transactions with feedback
2018-03-19 08:29:08 +01:00
Rainer Gerhards
937abdd107
Merge pull request #2527 from hanazuki/improve-tests-glbl-umask
tests/glbl-umask.sh: Improve test stability
2018-03-18 13:09:11 +01:00
Joan Sala
2336e5ad65 omprog: added tests for transactions with feedback 2018-03-17 15:41:25 +01:00
Rainer Gerhards
80f2d145f5
Merge pull request #2526 from hanazuki/tests-missing-slash
tests/Makefile: Fix broken TESTS
2018-03-17 12:39:10 +01:00
Rainer Gerhards
ce88147209 testbench: activate new test now that fix is present 2018-03-15 13:25:17 +01:00
Rainer Gerhards
fba936b0b1 testbench: add testcase for memory leak in stream class
Bug is currently exposed only via imfile. Happens when in readMode 0 a
partial line is read and no more data is present in the file during
that iteration. One partial message is lost in this case.

Note: this just adds the test, but does not activate it. Activation
shall happen after fix is crafted.

see also https://github.com/rsyslog/rsyslog/issues/2421
2018-03-15 13:22:31 +01:00
Kasumi Hanazuki
2ea7d7eef1 tests/glbl-umask.sh: Improve test stability
This patch improves the stability of tests/glbl-umask.sh, which now fails
when running after tests/rawmsg-after-pri.sh, since the glob pattern rsyslog.o*
matches rsyslog.out.compare, created by rawmsg-after-pri.sh.
2018-03-09 14:12:59 +09:00
Kasumi Hanazuki
907882a241 tests/Makefile: Fix broken TESTS
This patch fixes the list of TESTS, broken by a line without the backslash
introduced in Commit 87f296fd2e667e95f38991a8a7caf84c3458e7c9.
2018-03-09 13:23:32 +09:00
Rainer Gerhards
4fcfff5cd5 testbench: do not run some DB tests twice in split test runs
we can split the testbench into two test runs in order to make each of them complete
quicker (this currently is required for Travis, but may also be useful for other
cases). Some test are run twice in this scenario, which is obviously counter-productive.
We ensure now that at least some longer-running database tests are only executed
once in this setup.
2018-03-04 17:44:27 +01:00
Rainer Gerhards
e303fda3df build system: pgsql tests are not in tarball
The build system does not properly include the pgsql tests and
support files into the tarball (EXTRA_DIST).
2018-03-04 11:09:13 +01:00
Rainer Gerhards
a28fbd3340 CI: fix check that tarball is built correctly 2018-03-04 11:09:13 +01:00
Thomas Deutschmann
38fff0e757
tests/Makefile: Fix EXTRA_DIST and add testsuites/include-std-omfile-action.conf
This commit fixes EXTRA_DIST list which was broken via commit
87f296fd2e667e95f38991a8a7caf84c3458e7c9.

In addition, this commit adds the missing testsuites/include-std-omfile-action.conf file
to EXTRA_DIST.

Fixes: https://github.com/rsyslog/rsyslog/issues/2493
2018-02-20 21:44:27 +01:00
Rainer Gerhards
93bebb1f1f template: add option to generate json "container"
This enables easy JSON generation via template.

This commit also corrects an issue with the constant "jsonf"
format. That was recently added, and the implementation problem
only became visible when used inside a larger json object. No
officially released code is affected, thought - so it rellay
is just a side-note.

closes https://github.com/rsyslog/rsyslog/issues/2347
2018-02-16 08:22:49 +01:00
Rainer Gerhards
0d122c64fd
Merge pull request #2455 from PascalWithopf/omstdout_new_config_style
omstdout: add new configuration format
2018-02-14 08:19:05 +01:00
Rainer Gerhards
537cec5fce
Merge pull request #2459 from rgerhards/i2348
core/template: add format jsonf to constant template entries
2018-02-12 15:59:08 +01:00
Rainer Gerhards
87f296fd2e core/template: add format jsonf to constant template entries
closes https://github.com/rsyslog/rsyslog/issues/2348
2018-02-10 19:04:40 +01:00
Harshvardhan Shrivastava
ade17f9259 adding hash64 and hash64mod functions support in rainerscript
removing logmsg

fixing typo in Makefile.am

fixing typo

making default hash static

fixing cast issue

fixing test
2018-02-08 20:09:52 +05:30
PascalWithopf
c5e09041ce omstdout: add new configuration format
Omstdout can now be configured in the new style
and a parameter for the template was added.

closes http://github.com/rsyslog/rsyslog/issues/2376
2018-02-02 12:42:25 +01:00
Rainer Gerhards
254785e147 testbench: disable omprog-cleanup.sh test as it is unstable
see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-31 09:57:36 +01:00
Rainer Gerhards
565f74963c
Merge pull request #2441 from rgerhards/inline-alpine
remove build warnings under Alpine Linux
2018-01-27 10:54:05 +01:00
Rainer Gerhards
4f7c3438a7 testbench: do not override default Alpine CFLAGS
... as this brought us away from the abuild environment. Most importantly,
-Os was overriden by -O2, which did make a lot of warning go away.
2018-01-25 17:10:59 +01:00
Rainer Gerhards
8b6169fde8 testbench: temporarily disable sndrcv_kafka-vg-rcvr.sh test
This test is known to fail rather frequently. We disable it until
the root cause is solved, because otherwise CI does have too many
false positive failures.

see also https://github.com/rsyslog/rsyslog/issues/2434
2018-01-25 11:26:28 +01:00
Rainer Gerhards
548067fcc0 config: add ability to disable config parameter ("config.enable")
For auto-generated configs, it is useful to have the ability to disable some
config constructs even though they may be specified inside the config. This
can now be done via the ```config.disable``` parameter, applicable to all
script objects. If set to ```on``` or not specified, the construct will be
used, if set to any other value, it will be ignored. This can be used
together with the backtick functionality to configure enable and disable
from either a file or environment variable.

Example:
Let's say we want to conditionally load a module. Environment variable ```LOAD_IMPTCP```will be either unset or ```off``` . Then we can use this config construct:
```
module(load="imptcp" config.enabled=`echo $LOAD_IMPTCP`)
```
It the variable is set to ```off```, the module will **not** be loaded.

closes https://github.com/rsyslog/rsyslog/issues/2431
2018-01-24 16:16:45 +01:00
Rainer Gerhards
8cb9c5b3d2 script: implement cat file backticks capablity
gets us a bit closer to (essential) shell backtick capability
2018-01-23 16:51:28 +01:00
Rainer Gerhards
6327e43ea9 config: add include() script object
This permits to include files (like legacy $IncludeConfig) via a
script object. Needless to say, the script object offers more
features:

- include files can now be
  - required, with rsyslog aborting when not present
  - required, with rsyslog emitting an error message but otherwise
    continuing when not present
  - optional, which means non-present include files will be
    skipped without notice
  This is controlled by the "mode" parameter.
- text can be included form e.g. an environment variable
  --> ex: include(text=`echo $ENVVAR`)

This finally really obsoletes $IncludeConfig.

closes https://github.com/rsyslog/rsyslog/issues/2151
2018-01-22 18:36:03 +01:00
Rainer Gerhards
ff4a354f7b testbench: add test for new rscript backticks feature 2018-01-21 12:52:30 +01:00
Rainer Gerhards
82e30bf85f
Merge pull request #2413 from rgerhards/i2054
core: set TZ on startup if not already set
2018-01-19 12:04:51 +01:00
Rainer Gerhards
d01ea7e2eb core: set TZ on startup if not already set
In theory, TZ should be set by the OS. Unfortuantely, this seems
to be not the case any longer on many Linux distros. We now check
it and set it appropriate if not already given.

closes https://github.com/rsyslog/rsyslog/issues/2054
2018-01-19 10:29:56 +01:00
Rainer Gerhards
43daca630e testbench: add test for external command line parser
via omprog, which uses it

see also https://github.com/rsyslog/rsyslog/issues/2408
2018-01-18 12:30:28 +01:00
Rainer Gerhards
bcdce73362
Merge pull request #2402 from rgerhards/i2396-teste
improve testbench plumbing, new test
2018-01-18 10:54:43 +01:00
Rainer Gerhards
58fcfc4909 testbench: work-around racy tests
some omprog tests are racy as they depend on sleep calls to "synchoronize".
We have mostly been able to change this to more reliable synchronization.
A small window of raciness remains for some tests, but this seem to be
inevitable. Tests on fully loaded systems seem to incidate that we have
solved the issue sufficiently.

If that doesn't solve the sporadic failures, we need to further think about
how to handle this.

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-17 15:53:49 +01:00
Rainer Gerhards
76ef7a58b2 testbench: ensure we have the necessary commands to execute test
this might have caused sporadic failures on platform where "lsof" was
missing.

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-17 13:30:46 +01:00
Rainer Gerhards
00a18acefa testbench: add new test to check proper creation of jsonmesg property
see also https://github.com/rsyslog/rsyslog/issues/2396
2018-01-17 13:02:08 +01:00
Rainer Gerhards
3e058ba9ea testbench: fix/upgrade diag.sh framework
fixed some obvious copy&paste error, removed invalid verboseness and
added a standard way of doing grep checks on test result
2018-01-17 11:44:52 +01:00
Rainer Gerhards
639234201f
Merge pull request #2398 from rgerhards/i2391
fix memory leak in parse_json()
2018-01-17 08:13:50 +01:00
Rainer Gerhards
a26e57e4e7
Merge pull request #2397 from rgerhards/travis2
Travis: further collapse build matrix
2018-01-17 08:11:40 +01:00
Rainer Gerhards
b06a48d6b5 Travis: further collapse build matrix 2018-01-16 13:04:47 +01:00
Rainer Gerhards
0b01af41ed testbench: add test for potential parse_json() memory leaks
see also https://github.com/rsyslog/rsyslog/issues/2391
2018-01-16 12:28:51 +01:00
Rainer Gerhards
f87498e1f1
Merge pull request #2385 from jsiwrk/feature/omprog_feedback_simple_test
omprog: added test for feedback feature (without using transactions)
2018-01-16 09:15:40 +01:00
Rainer Gerhards
89318b2dea travis: combine some build checks
... and do them via containers. This also reduces resource usage and
runtime on Travis a bit.
2018-01-15 18:07:06 +01:00
Rainer Gerhards
b89466e105 Travis: run static analyzer via standard dev container
also some improvements to somewhat optimize the build matrix so
that we avoid unnecessary work.
2018-01-14 13:56:27 +01:00
Joan Sala
b6b0c54ebb omprog: added test for feedback feature (without using transactions) 2018-01-13 19:22:18 +01:00
Rainer Gerhards
f356d9f399 Travis: check build on Alpine Linux and Ubunut rolling (via docker container) 2018-01-12 17:29:02 +01:00
Rainer Gerhards
a87de59f6d
Merge pull request #2341 from bayaro/master
doFuncReplace(): add tail of src if tail is partially similar to 'replaceWith'
2018-01-12 11:48:56 +01:00
Thomas Deutschmann
468eeb79b8
tests: Run rscript_http_request.sh only when built with libcurl 2018-01-11 18:39:23 +01:00
baya
94e2be20d8 + yet one rscript_replace_complex test 2018-01-09 12:23:13 +02:00
Rainer Gerhards
3bf95fd46f
Merge pull request #2361 from rgerhards/i1836
core/action: implement errorfile capability
2018-01-08 13:17:05 +01:00
Rainer Gerhards
53930f31f2
Merge pull request #2364 from rgerhards/merge-2181
Merge PR #2181
2018-01-08 13:06:42 +01:00
Rainer Gerhards
ac152d89d2
Merge pull request #2355 from rgerhards/testbench-more-bsd-tests
testbench: enable more tests on BSD
2018-01-07 16:11:52 +01:00