1715 Commits

Author SHA1 Message Date
Rainer Gerhards
26d3fd0ef9
Merge pull request #2465 from CodeHarsh/master
adding hash64 and hash64mod functions support in rainerscript
2018-04-17 15:29:09 +02:00
PascalWithopf
a3b873ec57 mmjsonparse: add test for $-sign in container name 2018-04-16 09:53:07 +02:00
PascalWithopf
d44f5bfe88 modified test for invalid container name
test does now check for error messages
2018-04-16 09:43:55 +02:00
PascalWithopf
c55898aee3 add test for invalid container name in mmjsonparse
see also https://github.com/rsyslog/rsyslog/issues/2584
2018-04-16 09:29:36 +02:00
Joan Sala
1089bd4146 omprog: refactor tests, fix child closing issues
Refactor omprog tests. Fix sync issues in these tests by
using the feedback mode (confirmMessages=on) to synchronize
the test with the external program. Closes #2403 (I hope)

Fix omprog not properly closing child process when
signalOnClose=on. Needed for the new tests. Closes #2599

Fix omprog not waiting for the child process to terminate
when signalOnClose=off. Needed for the new tests. Closes #2600

Close all fds before executing the child even when valgrind
is enabled (--enable-valgrind). Needed for the new tests.

Fix memory leak when the xxxTransactionMark parameters were
used.
2018-04-14 23:41:03 +02:00
Rich Megginson
1d49aac5cb mmkubernetes: fix lnrules, add defaults, add test
Fix lnrules for CONTAINER_NAME

Add pkg check for lognorm >= 2.0.3 so we can set the macro
to enable ln_loadSamplesFromString

Add some reasonable default values for parameters, such as
kubernetesurl https://kubernetes.default.svc.cluster.local:443

Clean up sample.conf configuration file

Add test for mmkubernetes, including mock kubernetes service
2018-04-13 13:02:44 -06:00
Rainer Gerhards
bb5538f769 testbench: switch external testbench URL
this becomes necessary as the main site switches to https
2018-04-09 11:09:48 +02:00
PascalWithopf
39a8b833e8 add second parameter for cmp in tests
correct usage of cmp
2018-04-06 08:59:43 +02:00
PascalWithopf
ab56fc21c4 add tests for rainerscript functions
Tests for cnum(), int2hex() and substring() created.
2018-04-05 10:04:13 +02:00
Rainer Gerhards
3d7acd2656 omfile bugfix: segfault when empty filename is given
closes https://github.com/rsyslog/rsyslog/issues/2417
2018-04-03 12:26:52 +02:00
Rainer Gerhards
92cdd28c76 testbench bugfix: journal tests did not actually check for success
For some unknown reason, the check if data really was forwarded from
the journal was missing.

see also https://github.com/rsyslog/rsyslog/issues/2564
2018-04-01 18:21:12 +02:00
Rainer Gerhards
30136adbde
Merge pull request #2602 from rgerhards/ci-freebsd-imfile
testbench: address failure on FreeBSD
2018-04-01 18:13:02 +02:00
Rainer Gerhards
ba7b71277f testbench: address failure on FreeBSD
test imfile-endregex-timeout-with-shutdown-polling.sh fails, most probably
due to bad timing.
2018-04-01 10:48:05 +02:00
Harshvardhan Shrivastava
e105c7bff2 adding valgrind and making hash return typedef 2018-03-31 16:36:12 +05:30
Rainer Gerhards
039b395f37 imfile: re-enable support for reading old-style state files
see also https://github.com/rsyslog/rsyslog/issues/2231#issuecomment-376862280
2018-03-30 17:02:56 +02:00
Harshvardhan Shrivastava
915fe6935b moving fmhash to contrib and removing ignore-strict-prototypes 2018-03-30 00:09:54 +05:30
Harshvardhan Shrivastava
79b339c02b fixing init and adding tests 2018-03-29 16:14:56 +05:30
Rainer Gerhards
da7d9ab3b7
Merge pull request #2589 from rgerhards/i2529
imfile: refactor state file format
2018-03-29 10:53:14 +02:00
Rainer Gerhards
d5cadd26d4 imfile: refactor state file format
We change it to json and also change the way it is stored and loaded.
This sets base to additional improvements in imfile.

closes https://github.com/rsyslog/rsyslog/issues/2529
2018-03-29 09:15:27 +02:00
Harshvardhan Shrivastava
006ba9c5b1 making hashXX function module 2018-03-28 19:13:17 +05:30
Rainer Gerhards
4544abd19e testbench: disable omprog-transactions-failed-messages.sh on solaris
test consistently fails

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-03-28 10:30:56 +02:00
Harshvardhan Shrivastava
17738f25a8 Merge remote-tracking branch 'upstream/master' 2018-03-27 14:11:02 +05:30
Harshvardhan Shrivastava
c9720547d9 merge master 2018-03-27 14:10:50 +05:30
Rainer Gerhards
f8de6179ce
Merge pull request #2573 from rgerhards/i2572
CI: test build of all components without atomic operations
2018-03-27 09:11:10 +02:00
Rainer Gerhards
ab1bd8c01b imfile: large refactoring of complete module
This commit greatly refactors imfile internal workings. It changes the
handling of inotify, FEN, and polling modes. Mostly unchanged is the
processing of the way a file is read and state files are kept.

This is about a 50% rewrite of the module.

Polling, inotify, and FEN modes now use greatly unified code. Some
differences still exists and may be changed with further commits. The
internal handling of wildcards and file detection has been completely
re-written from scratch. For example, previously when multi-level
wildcards were used these were not reliably detected. The code also
now provides much of the same functionality in all modes, most importantly
wildcards are now also supported in polling mode.

The refactoring sets ground for further enhancements and smaller
refactorings. This commit provides the same feature set that imfile
had previously and all existing CI tests pass, as do some newly
created tests.

Some specific changes:
- bugfix: module parameter "sortfiles" ignored
  This parameter only works in Solaris FEN mode, but is otherwise
  ignored.  Most importantly it is ignored under Linux.
  fixes https://github.com/rsyslog/rsyslog/issues/2528
- bugfix: imfile did not pick up all files when not present
  at startup
  fixes https://github.com/rsyslog/rsyslog/issues/2241
  fixes https://github.com/rsyslog/rsyslog/issues/2230
  fixes https://github.com/rsyslog/rsyslog/issues/2354
- bugfix: directories only support "*" wildcard, no others
  fixes https://github.com/rsyslog/rsyslog/issues/2303
- bugfix: parameter "sortfiles" did only work in FEN mode
  fixes https://github.com/rsyslog/rsyslog/issues/2528
- provides the ability to dynamically add and remove files via
  multi-level wildcards
  see also https://github.com/rsyslog/rsyslog/issues/1280
- the state file name currently has been changed to inode number
  This will further be worked on in upcoming PRs
  see also https://github.com/rsyslog/rsyslog/issues/2231
- some enhancements were also done to CI tests, most importantly
  they were made more compatibile with BSD

Note that most of the mentioned bug fixes cannot be applied to older
versions, as they fix design issues which are solved by the refactoring.
Thus there are not separate commits for them.

Distro maintainers: you need to decide to apply this patch as whole
or not. Believe me, it is not worth the effort to try to extract
specific patches from this commit. There is a good reason we do
not have multiple commits.

closes https://github.com/rsyslog/rsyslog/issues/2359
2018-03-22 08:25:47 +01:00
Rainer Gerhards
bd8ea7e12e CI: add test to build without atomic operations
closes https://github.com/rsyslog/rsyslog/issues/2572
2018-03-21 16:57:50 +01:00
Rainer Gerhards
852214dfa7
Merge pull request #2556 from rgerhards/testbench-cleanup
testbench: improve cleanup
2018-03-21 16:03:55 +01:00
Rainer Gerhards
fb00f3ef01 testbench: temporarily disable more racy omprog tests
I have obviously overlooked some...

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-03-21 12:40:17 +01:00
Rainer Gerhards
a1a602da39
Merge pull request #2567 from rgerhards/disable-imjournal-tests
testbench: disable imjournal tests temporarily due to issues
2018-03-20 17:06:43 +01:00
Rainer Gerhards
3662f98d11
Merge pull request #2562 from jgerhards/rscript-search
rscript: make function modules loadable
2018-03-20 14:32:15 +01:00
Rainer Gerhards
dfdc2f0445 testbench: disable imjournal tests temporarily due to issues
So we permit CI to work well while we work on solving the issue.

see: https://github.com/rsyslog/rsyslog/issues/2564
2018-03-19 19:06:24 +01:00
Rainer Gerhards
a910ac65bd
Merge pull request #2559 from rgerhards/disable-omprog-tests
testbench: disable some racy omprog tests
2018-03-19 17:36:20 +01:00
Rainer Gerhards
87020b2f45
Merge pull request #2563 from rgerhards/fix-sendrcv_relp
nitfix: test included invalid parameter
2018-03-19 14:32:48 +01:00
Jan Gerhards
22fc00e897 rscript: make function modules loadable
function modules add functions to rainerscript dynamically,
change http_request into such a module (enabled by default).
This module can be used as a sample for future function modules.
2018-03-19 11:49:36 +01:00
Rainer Gerhards
5b7adcb232 nitfix: test included invalid parameter
now also given action a name for easier debug log check
2018-03-19 11:29:34 +01:00
Rainer Gerhards
f192ccc957 testbench: disable some racy omprog tests
these test are still instable and some concerns about their
validity at all have been raised. We now disable them to make
the testbench more reliable. Root cause needs to be investigated
and tests finally fixed or removed.

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-03-19 08:37:21 +01:00
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
Rainer Gerhards
3c32c844b6 testbench: improve cleanup
some tests use rsyslog.out.* file names, which were so far not cleaned up.
This can lead to all sorts of problems, including failure of
"make distcheck" due to leftover files. We now delete all of these files
on cleanup. This should not have any undesired side-effects.

Thanks to Kasumi Hanazuki for spotting this problem.

see also https://github.com/rsyslog/rsyslog/pull/2527
2018-03-18 13:05:24 +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