379 Commits

Author SHA1 Message Date
Rainer Gerhards
71984ef6c5 fix testbench: shutdown-immediate command did not work for instance 2 2017-02-02 15:32:49 +01:00
3bf605255a testsuite: Added 3 new tests for imfile checking wildcard support.
Testing wildcards matching in filename and directory name including
dynamically adding and removing directories and files.
2017-01-17 14:38:32 +01:00
Rainer Gerhards
4904b9bdca testbench: ease testbench debugging by outputting generated conf
most importantly, include line numbers, so that rsyslog startup
error messages can be traced to the right line. Due to the framework,
the line number info is otherwise not visible.
2016-11-30 15:46:42 +01:00
Janmejay Singh
24436aec20 omprog test for force-kill scenario (linux-only at this point) 2016-11-03 23:48:43 +05:30
Janmejay Singh
ba22858037 - fixed omprog FD-leak (it had out-FD leaking in both outfile and no-outfile scenarios)
- now omprog kills the program by issuing TERM signal, but it can wait indefinitely when TERM is ignored (will fix this in a separate commit)
- omkafka was complaining of deprecated-fn-use in 0.9.x versions of librdkafka, which is now fixed
- fixed an incorrect comment in imdiag
2016-11-03 23:44:33 +05:30
Rainer Gerhards
75715fe2f8 testbench: add test for empty host name 2016-10-27 11:12:47 +02:00
Rainer Gerhards
e4b257b47b Merge pull request #1123 from rgerhards/log-to-syslog
make rsyslog log by default to syslog()
2016-08-23 10:51:27 +02:00
Rainer Gerhards
99ac6d5143 make rsyslog log by default to syslog()
this enables us to put error messages to systemd journal; which is
especially useful as most distros by default throw away rsyslog
error messages.
2016-08-22 18:18:33 +02:00
Rainer Gerhards
148fdfd667 testbench: add test for dirty queue shutdown
This test simulates the case where the OS force-terminates rsyslog
before it completely finishes persisting the queue to disk.
2016-08-22 16:20:02 +02:00
Rainer Gerhards
3336b911b2 testbench: file HOSTNAME was not properly deleted on test initialization 2016-07-11 08:40:57 +02:00
Rainer Gerhards
7466ec1d81 testbench: add test to check omfile handling of unwritable files 2016-06-21 08:45:34 +02:00
Rainer Gerhards
c235a6bb47 Merge pull request #1035 from rgerhards/testbench-NUL-bytes
Testbench: add tests for NUL byte handling
2016-05-17 13:01:06 +02:00
Rainer Gerhards
2a3051c3df testbench: cleanup verboseness
this was introduced as a debug aid and is no longer needed
2016-05-17 08:22:17 +02:00
Rainer Gerhards
21fc15a9de testebench: always give test name 2016-05-16 17:56:34 +02:00
Rainer Gerhards
433f449e2d testbench: remove a debugging message which clutters test log
was actually forgotten to be removed after some change
2016-05-10 18:49:51 +02:00
Rainer Gerhards
d89c8d93a4 testbench: enable some more diagnostic output
It does not look really nice, but it can be useful in troubleshooting...
2016-05-10 11:10:07 +02:00
Rainer Gerhards
b8d02bee4a testbench: try to get core dumps if OS config supports it 2016-05-10 09:45:55 +02:00
Rainer Gerhards
3c17999593 testbench: try to output a stacktrace on abort on startup 2016-05-10 09:45:55 +02:00
Rainer Gerhards
c0c293276b testbench: detect rsyslog abort in startup phase
A segfault in startup can happen with some bugs. This required the testbench
to timeout waiting on startup files. While this is OK, it defers testbench
progress, and could cause to exceed CI systems runtime limit. That in turn
lead to loss of diagnostic information (because test-suite.log is not written).

This commit offers a quicker abort detection.

closes https://github.com/rsyslog/rsyslog/issues/1000
2016-05-10 09:45:55 +02:00
Rainer Gerhards
de80ab60c3 testbench: sometimes an instance hangs at end of test
shutdown detection was based on pid file, we should check the
actual pid. We can't use wait, because we want to be able to
timeout. This patch should fairly portable handle the situation.

closes https://github.com/rsyslog/rsyslog/issues/1005
2016-05-04 14:59:22 +02:00
Rainer Gerhards
a0225d3d7b testbench: detect hanging instance on test exit and fail test if so 2016-05-03 07:27:45 +02:00
Rainer Gerhards
a11d7dabd9 regression fix: disable accidently enabled in-depth test 2016-04-26 12:41:17 +02:00
Rainer Gerhards
e5814867bd maintain ChangeLog 2016-04-26 10:46:22 +02:00
Rainer Gerhards
dc7396dbc3 Merge branch 'master' of https://github.com/janmejay/rsyslog 2016-04-22 17:59:28 +02:00
Rainer Gerhards
69a4f8ec9a Merge branch 'kafka_integration_test' of https://github.com/janmejay/rsyslog into tmp 2016-04-22 17:56:22 +02:00
Janmejay Singh
003b8a80ff omkafka integration test 2016-04-19 15:34:10 +05:30
Janmejay Singh
a30bf638cc Trying to switch a stats-dependent test from timing based coordination to semaphore-based coordination. 2016-04-18 21:35:07 +05:30
Rainer Gerhards
c81316943d testbench/mmjsonparse: test empty cookie with multiple spaces in message
this verifies that an empty cookie also permits parsing if there
are multiple spaces in front of the actual JSON code

closes https://github.com/rsyslog/rsyslog/issues/940
2016-04-16 15:29:36 +02:00
Rainer Gerhards
e99ac029ad testbench: add test for disk queue .qi file with wrong queue size
main purpose is to show that a problem occurs. This test will
currently time out.

see also https://github.com/rsyslog/rsyslog/issues/868
2016-03-30 10:57:12 +02:00
Rainer Gerhards
5b3b1b0f63 testbench: ensure that test requiring journalctl work
and do not fail just because journalctl is missing on the system.
The latter e.g. is the case for example on Ubuntu 14.04, which has
journal support inside the OS, but no journalctl.
2016-03-20 16:15:28 +01:00
Rainer Gerhards
eae57069e9 testbench: streamline dynamic generation of config files
This hides the actual location of the config file from the
test, which is better in many aspects (I guess at least
"make distcheck" would otherwise kick our ass at some time...).
2016-02-23 17:50:33 +01:00
Rainer Gerhards
184514e2dd testbench: add support to dynamically generate test configs
this reduces the amount of work when crafting new tests
2016-02-23 14:58:16 +01:00
Janmejay Singh
c66402598e Re-sync with dynstats recycle interval(as opposed to stats flush interval, which happens multiple-times per recycle). This was a bug in the way test was written. Introduced a new counter in dyn-stats subsystem which is incremented every time metrics in dyn-stats bucket are recycled. 2016-02-21 00:51:48 +05:30
Janmejay Singh
25cc42c2ff pre-merged upstream for a clean merge-back 2016-02-04 16:14:21 +05:30
Rainer Gerhards
3112842e74 Merge branch 'master-merge-imptcp' into master-candidate
Conflicts:
	tests/Makefile.am
2016-02-01 08:20:54 +01:00
Rainer Gerhards
a12f659731 Merge branch 'master' of https://github.com/janmejay/rsyslog into master-merge-imptcp 2016-02-01 08:02:59 +01:00
Janmejay Singh
c504776d87 about imptcp_nonProcessingPoller.sh verbosity around imptcp effected message truncation: the problem was not tcpflood, but a incorrectly named test, which pointed investigation in the wrong direction 2016-01-31 02:03:43 +05:30
Rainer Gerhards
98463ed482 Merge branch 'master-integrate-dynstats' into master-candidate
Conflicts:
	.travis.yml
2016-01-29 15:45:11 +01:00
Rainer Gerhards
6b541ac89b travis: add valgrind suppression file for trusty
somehow trusty as used by travis does not include sufficient default
suppressions, e.g. we err out with a GNU clib releated violation.
2016-01-28 12:33:56 +01:00
Rainer Gerhards
3549041b0f Merge branch 'dyn_stats' of https://github.com/janmejay/rsyslog into master-integrate-dynstats
Conflicts:
	.travis.yml
	grammar/rainerscript.c
	plugins/imdiag/imdiag.c
2016-01-28 09:51:25 +01:00
Rainer Gerhards
ad8abfa8c6 travis: run testbench under trusty 2016-01-28 08:53:42 +01:00
Rainer Gerhards
3c9a3e3299 testbench fix: do not hang on invalid config file name 2015-12-22 17:42:10 +01:00
Janmejay Singh
79d1bdbc03 reload_lookup_table second-param(stub-value to be used in case of reload failure) made optional 2015-12-22 01:10:36 +05:30
Janmejay Singh
bf43179381 moved to async(dispatched on a different thread) lookup-table reload (stub param is still mandatory, making it optional requires more work) 2015-12-21 23:42:11 +05:30
Janmejay Singh
2a5272fe4c master pre-merge for travis run 2015-11-23 14:36:41 +05:30
Janmejay Singh
7a96794b12 made some changes to dyn-stats tests to make it more resillient to timing-problems (prevents bad-timing introduced occasional failures) 2015-11-17 17:48:59 +05:30
Janmejay Singh
56c7a4bfb1 test to cover dynstats counter-reset behaviour 2015-11-16 18:29:31 +05:30
Janmejay Singh
e24c175cae - fixed vg-tests to actually check exit code
- fixed and excercised reset dyn-metrics-table flow (where dynamic-metric names are discarded. this excercises unusedMetricLife timer expiry.)
2015-11-13 20:59:07 +05:30
Janmejay Singh
6da7aeb975 - dynstats basic-test first-cut
- vg-test caught a minor issue in impstats (fixed)
- placeholder created for other dynstats tests
- a new assertion in diag.sh which allows extracting a particular column and expecting sum-up to match given value
- imdiag supports injecting litteral messages now (test can send a fully formed syslog message through imdiag, its a backward compatible change in protocol, allows for richer things to be build while being fully backward compatible)
2015-11-13 17:45:07 +05:30
Rainer Gerhards
283096628f testbench: improve error message when content-check fails 2015-11-11 09:36:22 +01:00