479 Commits

Author SHA1 Message Date
Rainer Gerhards
6ec3bbe0fe
testbench: add a bit time-tracking to testbench runs
primary cosmetic (for delveoper's curiosity), plus a fix for where
printf was incorrectly called (which also did not cause real harm)
2018-11-11 17:45:41 +01:00
Rainer Gerhards
099b40e237
testbench: modernize some imfile tests, re-enable on FreeBSD
They did not work on FreeBSD because of an imfile bug which is
now fixed.
2018-11-11 17:32:26 +01:00
Rainer Gerhards
1c1de0f93d
testbench: improve wait_file_lines output a bit (cosmetic) 2018-11-11 13:56:58 +01:00
Rainer Gerhards
2d89f3d2cc testbench: add imfile tests for files > 2GB
see also https://github.com/rsyslog/rsyslog/issues/3249
2018-11-11 13:54:40 +01:00
Rainer Gerhards
7fe9f91f4e
testbench: improve imfile tests
also some slight improvements to testbench framework
2018-11-11 12:22:11 +01:00
Rainer Gerhards
c188e77177
testbench: provide some timestamps in test output
so that we get a better sense of execution time in failed tests
this is important to understand implications of slow test machines
and what we need to fix to handle that. Code is probably to be
extended if it proves useful.
2018-11-10 12:45:15 +01:00
Rainer Gerhards
14c00e8c03
testbench: detect imkafka producer failure and SKIP test in this case
kafka is known to fail and cause false positive testbench failures; we
now ignore this and have expanded our detection to this case here.
2018-11-10 12:45:04 +01:00
Rainer Gerhards
638ccea077
Merge pull request #3266 from rgerhards/tb-es4
testbench: make es-bulk-retry test more reliable
2018-11-09 11:56:09 +01:00
Rainer Gerhards
a1a0717681
fix testbench error reporting under distcheck
Error reporting did not work as we still used the wrong path to our new
urlencode utility. Being a python app, it remains in $srcdir.
2018-11-09 08:18:46 +01:00
Rainer Gerhards
cd290bdca2
testbench: make es-bulk-retry test more reliable
We now no longer depend on a fixed 'sleep' command but rather
check the output file for what we expect. This is much more
robust on slow test machines.

We believe this closes the below-mentioned issue. If not, it
should be re-opened.

closes https://github.com/rsyslog/rsyslog/issues/3104
2018-11-08 17:47:01 +01:00
Rainer Gerhards
68d203e88b
improvements to elasticsearch tests and framework (#3264)
* testbench: re-structure elasticsearch framework
2018-11-08 15:05:08 +01:00
Rainer Gerhards
6dbc3ca5f4
testbench: make libdbi test more reliable 2018-11-08 11:57:49 +01:00
Rainer Gerhards
f409daa911
testbench: modernize elasticsearch tests 2018-11-08 09:59:23 +01:00
Rainer Gerhards
72b9f7c3dc
Merge pull request #3260 from rgerhards/tb-kafka1107
testbench: make rsyslog shutdown predicate more reliable for kafka tests
2018-11-08 08:16:38 +01:00
Rainer Gerhards
2166eb80c4
Merge pull request #3252 from rgerhards/tb-nostats
testbench: let user know if test failure reporting is not enabled
2018-11-07 17:21:42 +01:00
Rainer Gerhards
5e80eb53e0
testbench: make rsyslog shutdown predicate more reliable for kafka tests
enhance testbench framework:
- function to wait until seq_check completes successfully
2018-11-07 16:56:57 +01:00
Rainer Gerhards
f818e38150
Merge pull request #3255 from rgerhards/i3088
testbench: detected kafka failure during test run and SKIP if so
2018-11-07 14:09:56 +01:00
Rainer Gerhards
98ae05058d
testbench: nitfixes and cleanup
based on issues detected by shellchek
2018-11-07 10:43:07 +01:00
Rainer Gerhards
6915aeb0f4 testbench: let user know if test failure reporting is not enabled
otherwise, one may be puzzled why no report is generated. I just
experienced this on a misconfigured buildbot builder... ;-)
2018-11-07 09:52:23 +01:00
Rainer Gerhards
db4c7eac79
testbench: detected kafka failure during test run and SKIP if so
better we skip the test than create false positives due to kafka failure.
Also improve broken Broker check with additional possibilites.

This commit introduces the functionality to a subset of tests. Follow-up
commits may extend it to all kafka tests.

see also https://github.com/rsyslog/rsyslog/issues/3088
see also https://github.com/rsyslog/rsyslog/issues/3057
2018-11-07 09:51:03 +01:00
Rainer Gerhards
8fa8211597
testbench: ensure error reporting params are urlencoded 2018-11-06 18:08:58 +01:00
Rainer Gerhards
86c1d4a5fb
testbench: improve framework, harden rscript http test
- the test now tries to detect unavailable http server, which
  should not result in test failure
- equivalent valgrind test changed to new methode, removing code
  duplication
- testbench supports
  * new exit code 177, which indicates environment error, makes
    test SKIP but still reports the failure
  * new exitcode, logurl stats reporting fields
  * report buildbot builder (if provided) in failure report
2018-11-06 12:51:46 +01:00
Rainer Gerhards
c4fc14d4cd
testbench: improve journal tests and testbench framework
improving both style and reliability of journal tests; along that way
also improve testbench framework:
- do cleanup on error_exit and skip
- explicit skip handler (vs exit 77)
  this permits us to do better cleanup
- new testbench functions for journal-specific functionality
  reduce code duplication and make things easier to maintain in the
  future
- provide a way to do valgrind and non-valgrind tests with a single
  test file

see also https://github.com/rsyslog/rsyslog/issues/2564
2018-11-05 18:27:48 +01:00
Rainer Gerhards
4af922d437
Merge pull request #3245 from rgerhards/i2564b
testbench: try to make journal tests more reliable
2018-11-05 16:43:03 +01:00
Rainer Gerhards
ab70a212b7
Merge pull request #3241 from rgerhards/tb-imfile
testbench: modernize "wait-file-lines" functionality
2018-11-05 15:54:39 +01:00
Rainer Gerhards
19334aa910
testbench: modernize "wait-file-lines" functionality
also some small other enhancements
2018-11-05 14:12:02 +01:00
Rainer Gerhards
61fc37f7ff
testbench: try to make journal tests more reliable
working on removing potential race between journal forward latency
and rsyslog shutdown. Also adding additional debug information to
improve understanding of potentially upcoming new test failures.

see also https://github.com/rsyslog/rsyslog/issues/2564
2018-11-05 13:13:05 +01:00
Rainer Gerhards
3f415a632b
testbench: improve code style, reduce duplication
based on issues detected by shellcheck
2018-11-05 11:18:05 +01:00
Rainer Gerhards
f66ad17e35
Merge pull request #3239 from rgerhards/i3006test
testbench: add test for backticks parameters
2018-11-05 10:34:34 +01:00
Rainer Gerhards
4b01dca190
testbench: add test for backticks parameters
checking that echo on non-exist env var does not abort rsyslog

see also https://github.com/rsyslog/rsyslog/issues/3006
2018-11-03 17:57:20 +01:00
Rainer Gerhards
41a1abcb2d
testbench: provide diagnostic info on mysql startup error
This also extends the testbench framework with the ability to define
test-specific custom exit handlers.
2018-11-03 14:12:53 +01:00
Rainer Gerhards
8612bd8583
improve bash coding style and fix a some bug in testbench
- duplicate diag.sh init call was not detected due to typo
- queue-persits test did not work correctly
- some general testbench framework improvements

issues found be shellcheck, fixes brought up other work to do
2018-11-02 17:25:11 +01:00
Rainer Gerhards
ed159adf81
testbench: grep fails when string starting with "-" is used
This was mistakenly interpreted as an option.
2018-10-30 09:47:43 +01:00
Rainer Gerhards
d09416c95f
core: add operating state file capability (new feature)
adds global(operatingStateFile="fn") and related handling (see doc
for details).

closes https://github.com/rsyslog/rsyslog/issues/1721
2018-10-29 15:59:47 +01:00
Rainer Gerhards
3e3a926542
Merge pull request #3215 from rgerhards/tb-err-reporting
testbench: ensure failure stats error reporting always happens
2018-10-29 15:42:54 +01:00
Rainer Gerhards
d0dcc721a0
testbench: ensure failure stats error reporting always happens 2018-10-29 14:04:22 +01:00
Rainer Gerhards
37fb6f7d5f
Merge pull request #3211 from rgerhards/tb-stable-imptcp
testbench: stabilize imptcp_large test
2018-10-29 10:06:43 +01:00
Rainer Gerhards
15d305bd3a
testbench: stabilize imptcp_large test
... and also fix some issue in test setup. This means the test has been
rewritten and now also support current script syntax. Bufferred i/o was
probably only used because of where it was copied from, and it was used
in a way that does not seem correct (iotimeout was set, but background
writing not activated).
2018-10-29 08:17:25 +01:00
Rainer Gerhards
07bd6a27fd
testbench: keep kafka/zookeeper running between tests 2018-10-28 14:24:46 +01:00
Rainer Gerhards
3b74de1831
Merge pull request #3186 from rgerhards/tcpflood
bugfix tcpflood testing tool: improper parameter validation
2018-10-28 08:40:35 +01:00
Rainer Gerhards
16b087ab10
Merge pull request #3198 from rgerhards/tb-flacky-tests
testbench: introduce concept of "unreliable" tests
2018-10-27 17:37:56 +02:00
Rainer Gerhards
ab3f4343f0
testbench: improve kafka test stability
zookeeper startup was not actually checked, it was just hoped
that it started within 2 seconds (sleep). On busy systems, this
may be too short, thus results in an improper start and thus can
result in follow-on problems during the test.

We have now corrected it so that we wait until we see a pid. It's
still questionable if this is sufficient to conclude zookeeper is
really ready for processing. But let's take one step after the
other.

see also https://github.com/rsyslog/rsyslog/issues/3057
2018-10-27 11:40:39 +02:00
Rainer Gerhards
a91a0db633
bugfix tcpflood testing tool: improper parameter validation
tool may abort when TLS transport is specified by mandatory parameters
are not specified

closes https://github.com/rsyslog/rsyslog/issues/3176
2018-10-26 18:44:23 +02:00
Rainer Gerhards
3b0c753842
testbench: introduce concept of "unreliable" tests
This permits to flag some tests as being unreliable. If done so, CI
can treat them specially. This is meant to get rid of time-consuming
issues with known problematic tests, but still retain the ability to
gather trouble-shooting information. Later commits may extend the
functionality.
2018-10-26 17:59:39 +02:00
Rainer Gerhards
60bbe1d14c
testbench: improve imkafka tests and testbench framework 2018-10-26 13:16:35 +02:00
Rainer Gerhards
877ac178a7
testbench: add imkafka tests
* auto-backgrounding
* error handling
* some small testbench framework changes that we needed

see also https://github.com/rsyslog/rsyslog/issues/3180
2018-10-26 11:51:55 +02:00
Rainer Gerhards
33f72c53b3
Merge pull request #3166 from rgerhards/tb-omkafka
testbench: try to make omkafka test more stable
2018-10-24 08:49:55 +02:00
Rainer Gerhards
edc54d923f
testbench: try to make omkafka test more stable
The test often misses messages. One idea is that rsyslog is actually
terminated too early, and thus messages are missing. To proove that idea,
we now explicitely wait for all messages to be processed.

see also https://github.com/rsyslog/rsyslog/issues/3057
2018-10-23 17:25:40 +02:00
Rainer Gerhards
0493e76983 fix shell scripting: depend on escaping fallback
Initial test commit, more to follow if things work out properly.

detected by shellsheck via CodeFactor service
2018-10-23 16:31:40 +02:00
Rainer Gerhards
ce0b3278e1
Merge pull request #3159 from rgerhards/i3154
fix imkafka hang on unavailable kafaka server
2018-10-23 15:19:43 +02:00