2371 Commits

Author SHA1 Message Date
Rainer Gerhards
a1c92c1c9c
Merge pull request #3900 from rgerhards/diskq-multi-file-del
core queue bugfix: handle multi-queue-file delete correctly
2019-10-16 17:15:42 +02:00
Rainer Gerhards
103a44263d
core queue bugfix: handle multi-queue-file delete correctly
Rsyslog may leave some dangling disk queue files under the following
conditions:

- batch sizes and/or messages are large
- queue files are comparatively small
- a batch spans more than two queue files (from n to n+m with m>1)

In this case, queue files n+1 to (n+m-1) are not deleted. This can
lead to problems when the queue is re-opened again. In extreme cases
this can also lead to stalled processing when the max disk space is
used up by such left-over queue files.

Using defaults this scenario is very unlikely, but it can happen,
especially when large messages are being processed.
2019-10-15 10:51:05 +02:00
Rainer Gerhards
73dc50ad0c
testbench: fix unreliable gzipwrite test
The test was timing-sensitive as we did not properly check all data
was output to the output file - we just relied on sleep periods.

This has been changed. Also, we made some changes to the testing
framework to fully support sequence checking of multiple ZIP files.
2019-10-15 10:28:03 +02:00
Rainer Gerhards
4d7d8ce227
Merge pull request #3888 from rgerhards/tb-mmpstrucdata-escape
testbench: add test for mmpstrucdata with RFC5424 escape sequences
2019-10-10 18:10:44 +02:00
Rainer Gerhards
a8e7f3e7b6
Merge pull request #3891 from alorbach/al-openssl-oldapiwarn
openssl: added link to doc for gnutlsPriorityString error msg when op…
2019-10-10 18:10:27 +02:00
Rainer Gerhards
4a4a09c5a0
testbench: improve dynstats tests and make them more portable 2019-10-09 12:21:14 +02:00
aa17c24570 openssl: added link to doc for gnutlsPriorityString error msg
When openssl version is too old, a documention link will be added
to the error message now.

Also changed openssl too old check in testsuite
2019-10-08 15:36:28 +02:00
Rainer Gerhards
2c0a300e35
testbench: add test for mmpstrucdata with RFC5424 escape sequences 2019-10-07 12:50:16 +02:00
Nelson Yen
cc0537c808 bug fix: allow improg to handle multi-line inputs
miscellaneous bug fixes in improg:
- properly truncate string after an input event is submitted
- set msgoffset to 0.
- tests added to check above fixes
2019-10-02 10:46:13 -07:00
Rainer Gerhards
5f85577cd8
testbench: add basic test for immark 2019-08-20 09:11:16 +02:00
Rainer Gerhards
255a6882f5
testbench: add more tests for $allowedSender directive 2019-08-19 15:35:27 +02:00
Rainer Gerhards
9b0c917f1b
Merge pull request #3826 from rgerhards/tb-allowed-sender
testbench: add tests for $AllowedSender functionality
2019-08-19 09:03:44 +02:00
Rainer Gerhards
4638699bce
testbench: modernize and stabilize some tests 2019-08-17 18:24:54 +02:00
Rainer Gerhards
f447fda845
testbench: add tests for $AllowedSender functionality
while this is deprecated, it is still used in practice. So far no
test guarded this functionality.
2019-08-16 20:45:33 +02:00
Rainer Gerhards
42a8051ad9
testbench: make most tests use a port file and assign listen port 0
This makes the test much more robust against heavily loaded test
systems.
2019-08-16 17:31:52 +02:00
Rainer Gerhards
f9d4b3778b
testbench: disable test known to fail
temporarily disabled because it fails quite often - fix in progress
If we do not disable it, most CI runs fail.
2019-08-16 11:45:35 +02:00
Rainer Gerhards
56086da5b8
Merge pull request #3828 from rgerhards/tb-asynwr_deadlock
testbench: experimentally increase queue empty check period
2019-08-16 11:36:48 +02:00
Rainer Gerhards
fa294c73ac
Merge pull request #3823 from rgerhards/trailing-whitespace
core/action: guard action.externalstate.file content against whitspace
2019-08-16 10:23:41 +02:00
Rainer Gerhards
e7f3649da1
Merge pull request #3822 from rgerhards/i3817
imtcp bugfix: multiple listnerPortFile parameter did not work
2019-08-15 18:27:26 +02:00
Rainer Gerhards
bb32ae005f
testbench: experimentally increase queue empty check period
The test frequently failed in a way that suggests rsyslog terminated too
early. We try if we can improve the situation by prolonging the empty
check. While there are better solutions for this special case, there are
some cases where we do no have them. So it is good to know if this
method works.
2019-08-15 17:16:52 +02:00
Rainer Gerhards
185b388fb0
testbench: add test for imtcp multiple listener port files
This also enhances the testbench plumbing a bit and updates other tests
to support that.
2019-08-15 10:22:48 +02:00
Rainer Gerhards
f958e1556b
testbench: modernize tests and make them more reliable 2019-08-15 09:59:52 +02:00
Rainer Gerhards
3a28a6fab4
core/action: guard action.externalstate.file content against whitspace
remove trailing whitespace before checking the status string. This is
most important as a line usually ends with \n, which is considered
trailing whitespace. Accepting this increases usability.
2019-08-15 08:59:21 +02:00
Rainer Gerhards
3896f9a768
Merge pull request #3818 from rgerhards/tb-mmpstrucdata-case
testbench: modernize mmpstrucdata-case test
2019-08-15 08:28:05 +02:00
Rainer Gerhards
d75533fa69
Merge pull request #3809 from rgerhards/test3796
testbench: add tests for omelasticsearch error configs
2019-08-14 16:58:18 +02:00
Rainer Gerhards
9bba4643b9
testbench: modernize mmpstrucdata-case test 2019-08-14 16:57:23 +02:00
Rainer Gerhards
721b2372b3
Merge pull request #3819 from rgerhards/tb-es-reduce_restart
testbench: add test for imuxsock legacy format
2019-08-14 16:16:42 +02:00
Rainer Gerhards
4816262912
Merge pull request #3821 from rgerhards/tb-gzipwr_large
testbench: make gzipwr_large test more reliable and improve plumbing
2019-08-14 14:44:42 +02:00
Rainer Gerhards
bc0efab9eb
testbench: improve testbench plumbing for gzip and fail cases
We have added new capabilities to the testbench plumbing to automatically
deal with gzip-compressed files. This also permits to use the wait_seq_check
function to work for gzip tests as well. The known-timing-sensitive
gzipwr_large test now makes use of the new capabilities. This enables us
to more reliably detect when we can savely shutdown the tested instance.

This commit also adds an ability to "abort" the full testbench run on
first test failure. This is especially useful during CI.
2019-08-14 12:57:49 +02:00
Rainer Gerhards
628631cd10
Merge pull request #3813 from rgerhards/tb-imptcp2
testbench imptcp: make port use more reliable
2019-08-14 12:51:14 +02:00
Rainer Gerhards
afdce50957
Merge pull request #3814 from rgerhards/tb-nitfixes
testbench: remove debug output; lessen kafaka tests output
2019-08-14 10:57:59 +02:00
Rainer Gerhards
b600203e0c
testbench: add test for imuxsock legacy format
This was never tested. Ensures we don't accidently break existing
configurations.
2019-08-13 18:16:19 +02:00
Rainer Gerhards
9699d1adf3
Merge pull request #3815 from rgerhards/tb-sndrcv-current
testbench: update sndrcv test to newest standard
2019-08-13 16:11:36 +02:00
Rainer Gerhards
fdf61606cf
testbench: add tests for omelasticsearch error configs
These test test errors described in
   https://github.com/rsyslog/rsyslog/pull/3796
2019-08-13 14:23:53 +02:00
Rainer Gerhards
ad5285f30e
testbench imptcp: make port use more reliable
also modernize some tests a bit
2019-08-13 13:28:06 +02:00
Rainer Gerhards
e3ebedd937
testbench: increase runtime for know-problematic test
this test often failed "unexpectedly" when the CI system is very
busy - assuming it just had insufficient time.
2019-08-13 10:03:39 +02:00
Rainer Gerhards
e8b9476d0c
testbench: update sndrcv test to newest standard
this makes the test more reliable in regard to port use. This is also
a model-commit which can be used to update other tests and base new
tests on it.
2019-08-13 09:46:20 +02:00
Rainer Gerhards
63d4726f7c
testbench: remove debug output; lessen kafaka tests output
the kafka tests generate a wealth of usually-unneeded output which
clutters the CI logs and makes them almost unusable.
2019-08-13 08:27:56 +02:00
Rainer Gerhards
5b720473c1
imptcp bugfix: port="0" parameter did not work as expected
when multiple interfaces and/or protocols could be bound, each of
them used a different listener ports were assigned. While this is
basically correct, it makes things unusable, especially as
listenPortFileName will only contain the port number used for
the latest listener.

This patch now follows the model of nsd_ptcp.c to assign only
the first port randomly and then use that port consistently.
2019-08-12 13:29:07 +02:00
Rainer Gerhards
db687cfc09
Merge pull request #3782 from rgerhards/i3756-testing
testbench: add multithreading tests with omfile async io/zip writing
2019-08-10 13:06:20 +02:00
Rainer Gerhards
130397b950
Merge pull request #3797 from rgerhards/tbsan-imptcp
imptcp bugfix: received bytes counter improperly maintained
2019-08-10 11:14:14 +02:00
Rainer Gerhards
b9a5e95cb2
Merge pull request #3803 from rgerhards/travis-fix
travis: libmongoc-dev does not install all needed
2019-08-09 13:05:02 +02:00
Rainer Gerhards
cfebaed413
travis: libmongoc-dev does not install all needed
there seem to be packaging changes in ubuntu or some other repos
we use on travis. This should fix the issue.
2019-08-09 12:33:20 +02:00
Rainer Gerhards
2ba1484a95
imptcp bugfix: received bytes counter improperly maintained
imptcp counts the number of bytes received. However, receives
happen on different worker thread. The access to the counter
was not synchronized, which can cause loss of updates. Also,
thread debuggers validly flag this as an error, which creates
problems under CI.

This commit fixes the situation via atomic operations and
falls back to mutex calls if they are not available.

Detected by LLVM thread sanitizer.

closes https://github.com/rsyslog/rsyslog/issues/3798
2019-08-09 10:39:57 +02:00
Rainer Gerhards
06ff736be8
Merge pull request #3788 from alorbach/imkafka-i3765
testbench: Added imkafka test with two rsyslog instances same consumergroup
2019-08-07 08:42:39 +02:00
Rainer Gerhards
36d2fe9c4c
Merge pull request #3793 from rgerhards/tb-omusrmsg
testbench: add basic tests for omusrmsg
2019-08-07 08:32:24 +02:00
Rainer Gerhards
c136aa899b
Merge pull request #3790 from rgerhards/tb-tsan
testbench: add thread analyzer blacklist
2019-08-05 18:39:33 +02:00
Rainer Gerhards
9eefc321b7
testbench: add thread analyzer blacklist
important step to get us started - in the future we will try to reduce
blacklisted parts
2019-08-05 14:41:46 +02:00
Rainer Gerhards
d814a0662b
testbench: add basic tests for omusrmsg 2019-08-05 09:27:48 +02:00
Rainer Gerhards
66d9e3b638
Merge pull request #3773 from n2yen/omhttp-enable-checkpath
Enable checkpath option in omhttp
2019-08-05 09:01:37 +02:00