2543 Commits

Author SHA1 Message Date
Rainer Gerhards
36725afe2c
Merge pull request #4256 from jsiwrk/feature/adapt_omprog_test
omprog: adapt test to testbench improvements
2020-04-29 17:35:00 +02:00
Rainer Gerhards
f0d71ce408
Merge pull request #4263 from alorbach/pr-issue-4131
SKIP librelp tlscmd tests if librelp was build without openssl support
2020-04-29 13:29:15 +02:00
Rainer Gerhards
589eac07b2
Merge pull request #4240 from alorbach/pr-issue-4005
testbench: Add test for imrelp to check broken session handling.
2020-04-29 12:03:16 +02:00
Rainer Gerhards
67934f1feb
Merge pull request #4254 from alorbach/pr-issue-4238
omudpspoof: Fixed issues with oversized messages (Exceeding the configured MTU setting).
2020-04-29 11:42:50 +02:00
15f5a1bda2 SKIP librelp tlscmd tests if librelp was build without openssl support
closes https://github.com/rsyslog/rsyslog/issues/4131
2020-04-29 09:26:25 +02:00
Joan Sala
0e49c8d1f8 omprog: fix assert failed on HUP with output flag
If the 'output' setting of omprog was used and rsyslog received a HUP
signal just after starting (and before the omprog action received the
first log to process), an internal assertion could fail, causing
rsyslog to terminate. The failure message was "rsyslogd: omprog.c:660:
closeOutputFile: Assertion `pCtx->bIsRunning' failed."

The failure could also occur if rsyslog received a HUP signal during
the shutdown sequence.

This bug was introduced in v8.2004 by PR #4255.

Although a test already existed that checked the interaction of HUPs
with the 'output' setting, it didn't always fail in this particular case
due to timing conditions. The test has been improved to cover this case
more reliably.
2020-04-29 01:18:25 +02:00
Joan Sala
abc2f83943 omprog: adapt test to testbench improvements
Adapt one of the omprog tests to the latest improvements in the
testbench framework, for consistency with other similar tests. The test
behaviour has not changed.

Add some temporary files created by the testbench to gitignore file.
2020-04-28 21:04:15 +02:00
Rainer Gerhards
686835c880
Merge pull request #4234 from alorbach/pr-issue-4233
stream.c: Moved doSizeLimitProcessing check to strmWrite
2020-04-28 10:26:57 +02:00
3c0f642740 omudpspoof: Fixed issues with oversized messages
First issue was an incorrect packet length in UDP Header. It has to be the FULL UDP Packet
regardless of the MTU Setting. As a result regardless of IP fragmentation, the MTU setting
also limited the siizmax size of the UDP message.

The second issue was incorrect calculation of the UDP Checksum with libnet if
IP fragmentation was used (Based on MTU Setting). As a result, the network packets were
dropped by the tcp stack before they even could reach there target. The workarround for this
problem is, that we set the UDP Checksum to 0x0000 which allows skipping of the checksum
test. Fixing the problem by calculating the correct UDP Checksum would require some
code changes in the libnet.

Also fixed the omudpspoof bigmsg test and increased the testing size to 16KB.
2020-04-27 11:13:24 +02:00
e2a9e3da2d omudpspoof: Added test for oversized UDP messages (above 1500 MTU) 2020-04-27 11:13:24 +02:00
baee0bd542 testbench: Add test for imrelp to check broken session handling.
For successfull test, the PR
https://github.com/rsyslog/librelp/pull/184
 for Issue
https://github.com/rsyslog/librelp/issues/183
is needed. Otherwise the test will trigger a double free inside
librelp which results in a segfault in some cases.

closes: https://github.com/rsyslog/rsyslog/issues/4184
closes: https://github.com/rsyslog/rsyslog/issues/4005
2020-04-27 10:55:50 +02:00
Rainer Gerhards
02e5cbee91
testbench tooling: update kafka components
those used so far are outdated, bump to newest version
2020-04-24 08:53:17 +02:00
b84c9debea stream.c: Moved doSizeLimitProcessing check to strmWrite
The check was done in strmPhysWrite before which caused syslog
messages to split in the middle if the syslog message batch exceeded
the default IO Buffer size.

closes: https://github.com/rsyslog/rsyslog/issues/4233
2020-03-31 17:27:01 +02:00
Rodriguez,German J
95e830cc22
omhttp: Adding multiple http headers capability 2020-03-17 20:12:10 -05:00
901eb09860 openssl: add check for LIBRESSL
Disable use of "@SECLEVEL" in default cipher string and
avoid SSL_CONF_CTX_set_flags() API when LIBRESSL is used.
This means tlscommands will not work.

closes: https://github.com/rsyslog/rsyslog/issues/4210
2020-03-11 08:17:01 +01:00
Rainer Gerhards
6ef5b3e1db
Merge pull request #4208 from rgerhards/testbench-complex1
testbench: adjust queue enqueue timeouts to current standards
2020-03-04 15:52:28 +01:00
Rainer Gerhards
9753d18f1f
testbench: adjust queue enqueue timeouts to current standards
Timeouts were too short to take care of slow CI environments.
2020-03-04 12:38:15 +01:00
Rainer Gerhards
b17fec0c71
testbench: add some diagnostic info to analyze false positives
We have some false positives with imfile checks and this commit
both improves the testbench framework slightly and adds debug
info.

The debug info should be remove when we finally find the cause
of the issue, but it does not hurt if it stays for a quite a
while. Thus we can analyze the false positives over an extended
period of time - what is what it looks like we need to do to
find the root cause.
2020-03-04 10:51:22 +01:00
Jeff Marckel
f604d5269b imjournal: remove strcat call 2020-02-27 11:52:32 -06:00
Rainer Gerhards
4f2394a9d1
Merge pull request #4174 from jwslater0823/master
testbench: modify es_response_get_msgnum.py for python3
2020-02-24 08:47:49 +01:00
Rainer Gerhards
4d1f7bd11a
Merge pull request #4182 from alorbach/pr-issue-4170
openssl nsd driver: Switch to SSL_CTX_use_certificate_chain_file API
2020-02-24 08:43:03 +01:00
Rainer Gerhards
822ac8df1c
Merge pull request #4177 from alorbach/pr-issue-4134
testbench: Fixed two minor issues in omkafkadynakey.sh test.
2020-02-20 17:36:22 +01:00
Rainer Gerhards
04599b9de8
Merge pull request #4168 from alorbach/pr-issue-4158
testbench: increased max extra data length in tcpflood from 256 to 512KB
2020-02-20 17:34:27 +01:00
493b04b846 openssl nsd driver: Switch to SSL_CTX_use_certificate_chain_file API
Switched from SSL_CTX_use_certificate_file to SSL_CTX_use_certificate_chain_file
API for loading the certificate into the certificate store.

According to the openssl doc, the SSL_CTX_use_certificate_chain_file API has the
advantage that it can load the main certificate (First in the PEM) and many chain
certificates after that automatically.

See notes section for more:
https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_use_certificate_chain_file.html

closes: https://github.com/rsyslog/rsyslog/issues/4170
2020-02-19 14:26:25 +01:00
608c4907ab testbench: Fixed two minor issues in omkafkadynakey.sh test.
- topic check was done on wrong (hardcoded topic)
- rsyslog_out_log was overwritten by kafkacat check which caused the
  seq_check to fail at the end.

closes: https://github.com/rsyslog/rsyslog/issues/4134
2020-02-17 11:00:03 +01:00
jwslater0823
343a0853a0
testbench: modify es_response_get_msgnum.py for python3
python3 does not like mixing spaces and tabs for indentation, so we get rid of the tab before print().
2020-02-15 16:34:51 -08:00
f4aa6473d8 testbench: set max extra data length for tcpflood from 256 to 512KB.
Added a imrelp test for big messages (256KB).

see also: https://github.com/rsyslog/rsyslog/issues/4158
2020-02-11 18:01:56 +01:00
Rainer Gerhards
0603e3ac86
testbench: add random data to test_id
We use the test_id to generate unique files during parallel
runs. So far we used a combination of ms-based timestamp and
hash of test name. Practice shows that under some circumstances
the generated ids are not unique and thus test get file conflicts
and false positives.

This is now changed so that the test_id we add 4 bytes of random
data to the test ID. This is hopefully sufficient to make the IDs
of test runing in parallel unique.
2020-02-10 18:11:58 +01:00
Rainer Gerhards
7c2eaa8f2e
build system: change --enable-imfile-tests default to "yes"
This was accidentally set to "no". Test for imfile should by
default run when imfile is enabled.

We also temporarily disable the failing tests - this makes
it posible to run the remaining tests during CI and prevent
future errors. That is better than nothing. Tests are to be
re-enabled when the imfile bug mentioned below is fixed.

see also https://github.com/rsyslog/rsyslog/issues/4120

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2020-01-30 09:36:35 +01:00
Rainer Gerhards
05180a6b40
testbench: add suppression for pselect() valgrind false positive
we are pretty sure this is a false positive

see also https://github.com/rsyslog/rsyslog/issues/4143
2020-01-29 16:29:35 +01:00
Rainer Gerhards
ac95688fd5
build system: add option --enable-gnutls-tests
This enables us to build GNUtls support but not necessarily
test it in CI. This is useful for some specialised subcomponent
test.
2020-01-26 16:28:18 +01:00
Rainer Gerhards
e16ea90bb6
Merge pull request #4087 from rgerhards/tb-loadbalance
testbench: new test for loadbalancing via global variables
2020-01-26 13:11:08 +01:00
Rainer Gerhards
6be13dc092
devel tools: show stalled tests from "make check"
CI systems cancel out runs that are stalled. Unfortunately, it is very
hard to find the test that caused the stall. This commit extends the
toolset to detect logs without a matching .trs file, which is a strong
indication of an aborted test.

This alos modernizes some tests in order to remove sample *.log files
which would otherwise always clutter log output.
2020-01-24 18:45:12 +01:00
Rainer Gerhards
63145387cb
testbench: modernize and make more robust
This also modernizes the testbench framework
2020-01-23 18:52:48 +01:00
Rainer Gerhards
1a4351718d
Merge pull request #4148 from rgerhards/i3853
testbench: fix final issues for python 3 transition
2020-01-23 16:21:16 +01:00
Rainer Gerhards
618f743299
testbench: fix final issues for python 3 transition
Thanks to Michael Biebl for his help on this issue.

This patch also contains some slight test modernization and
a "name fix" for a non-valgrind test.

closes https://github.com/rsyslog/rsyslog/issues/3853
2020-01-23 12:38:03 +01:00
Rainer Gerhards
148c2767e7
testbench: further improvements
make more robust and remove a potentially enternal loop which could
lead to abort in CI system without error indication.
2020-01-23 12:06:36 +01:00
Rainer Gerhards
46b15e8733
testbench: modernize and make more robust
also fixing some nits, like too verbose output (which may cause
buildbot to abort)
2020-01-22 14:33:19 +01:00
Rainer Gerhards
4219c65cb6
testbench: new test for loadbalancing via global variables
This is a useful use case which was so far not covered by any tests.
2020-01-20 12:48:06 +01:00
Rainer Gerhards
4c99ac090c
chkseq testbench tool bugfix: -i option did not work for values > 1 2020-01-20 11:49:39 +01:00
Rainer Gerhards
e00580534b
core bugfix: potential race during HUP
when rsyslog is HUPed immediately after startup and before it is fully
initialized, there is a potential race with the list of loaded modules.

This patch ensures no bad things can happen in that case.

Detected by LLVM TSAN, not seen in practice.

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2020-01-20 08:22:15 +01:00
Rainer Gerhards
58dfe006a8
testbench: improve tests
modernize them, reduce robustness against slow machines, provide some
test framework functional enhancements and optimizie some tests
2020-01-19 16:09:44 +01:00
Rainer Gerhards
3681b4d414
Merge pull request #4112 from rgerhards/tb-robust6
testbench: make tests more robust against slow machines
2020-01-12 14:09:12 +01:00
Rainer Gerhards
636c2d3c0a
Merge pull request #4113 from rgerhards/tb-robust7
testbench: modernize tests and make more robust in regard to timing
2020-01-12 14:04:07 +01:00
Rainer Gerhards
f12c54cb2c
Merge pull request #4107 from rgerhards/i4098
omfwd: parameter streamdriver.permitexpiredcerts did not work
2020-01-12 12:55:08 +01:00
Rainer Gerhards
a95bce2835
testbench: modernize tests and make more robust in regard to timing 2020-01-12 12:50:27 +01:00
Rainer Gerhards
e73c0bd136
testbench: make tests more robust against slow machines 2020-01-12 11:16:54 +01:00
Rainer Gerhards
8e4a6f4836
testbench: modernize some tests
This also makes port use more reliable.
2020-01-11 16:30:26 +01:00
Rainer Gerhards
80b3fc65d5
omfwd: parameter streamdriver.permitexpiredcerts did not work
This commit fixes the issue and adds tests to ensure the parameter
is understood

closes https://github.com/rsyslog/rsyslog/issues/4098
2020-01-11 16:16:03 +01:00
Rainer Gerhards
fa77d6d30d
Merge pull request #4110 from rgerhards/tb-robust5
testbench: modernize some tests
2020-01-11 16:02:49 +01:00