Also added a test based on imtcp-tls-ossl-basic.sh which tests
the new -k parameter with tcpflood called:
imtcp-tls-ossl-basic-tlscommands.sh
Fixed OpenSSL error reporting in tcpflood which was running into
a loop when OpenSSL error stack was printed out.
State file handling was invalid. When a file was moved and re-created
rsyslog could use the file_id if the new file to write the old files'
state file. This could make the file reader stuck until it reached the
previous offset. Depending on file sizes this could never happen AND
would cause large message loss. This situation was timing dependent
(a race) and most frequently occurred under log rotation. In polling
mode the bug was less likely, but could also occur.
closes: https://github.com/rsyslog/rsyslog/issues/3465
closes: https://github.com/rsyslog/rsyslog/issues/3468
testbench: cleanup, including fix of false positives
some environments have faulty components; also some tests failed simply because
their runtime *is* far longer than supported by default. Also re-instantiated
some "lost" tests and done some general cleanup.
The old method via startup timeout was less reliable. We now use time-based
runtime method. This PR fixes all startups, but leaves some shutdown
scenarios in previous state.
This also makes the test more reliable on slow machines as the max runtime
timeout is more secure to check. We had some tests which required extended
startup time (but not overall runtime) which failed due to too-short
startup timeout.
* add an overall timeout value for tests - if running longer,
testbench framework tries to FAIL and end test. Note that
this is not bullet-proof and not intended to be so.
* guard against hanging rsyslog instances via a new imdiag
feature to abort after n number of seconds; among others,
this guards as against timeout-cancel in CI, which is always
pretty hard to diagnose - now we see these errors in test-suite.log
* fix a bug in tcp zip test, which actually did not use zip mode
* experimnentalls add debug output to better understand
shutdown_when_empty operation; goal is to improve understanding
and then remove that code again.
* improve shutdown predicate for a couple of tests
* made travis run make check with two parallel threads, for which
we seem ready now. Nevertheless, it's still experimental and we
may roll this back if required.
while this is useful for users as well, we have done it so
that we can handle slow CI systems during CI runs. It is also
required for massively parallel testing, which makes each
individual test rather slow.
With the new settings, the testbench framework can now set
longer timeouts by defaults. Also updated framework accordingly.
They now wait for the output file to have the execpected number of lines
before rsyslog is shutdown. From past experience we know that the
shutdown "queue empty detection" is not 100% reliable on very slow
machines/environments.
... due to the fact that it stores the servers result page.
We could avoid this by using curl (which is better for this kind of
job), but curl is not always present whereas wget is requried for
testbench in any case. So we just instruct wget to discard the
server response.
This is primarily a cosmetic fix, as multiple core files should never
exist. The only exception might be parallel builds, but in this case
the whole concept does not work correctly (we may probably see into
that when we finally support parallel builds, which we do not yet).
detected by shellcheck