168 Commits

Author SHA1 Message Date
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
Janmejay Singh
dbf6e5e5fc - sparseArray fixed: impl was incorrect (according to proposal it was supposed to do a less-than-or-equal-to match, but the first-cut implemented an strict-equals-match).
- negative-tests-case: which tries a bunch of bad-table-definition inputs and tests resillience to silly errors in table-definition
2015-11-03 17:10:29 +05:30
Janmejay Singh
3a10a78ede Fixed lookup-table reload bug, which ignored table-length of reloaded table, resulting in additional entries being invisible while looking-up (binary-search would work with old-table-length). This would be a security-issue or may cause a crash if reloaded table is actually smaller (memory access beyond table). 2015-09-30 17:29:24 +05:30
Tomas Heinrich
90972a97bd testbench: remove unneeded variable and file
Both seem to have no effect.
2015-09-01 14:24:25 +02:00
Tomas Heinrich
db024a910f testbench: don't spawn interactive shells 2015-09-01 13:55:53 +02:00
Tomas Heinrich
1e5f271628 testbench: root all calls to diag.sh in srcdir
Not using srcdir breaks out-of-tree builds.
2015-09-01 13:41:11 +02:00
Tomas Heinrich
cb305a6e66 testbench: remove redundant calls to error-exit
error-exit is already called within the commands whose success is
tested.
2015-09-01 13:28:52 +02:00
Tomas Heinrich
9d2d26e631 testbench: all calls to diag.sh need to be sourced
The commands are implemented in a way which assumes they have global
side effects (e.g. exit terminating the current test). Not sourcing
the script breaks this assumption.
2015-09-01 11:42:48 +02:00
df3d4a3922 test-suite: Added !#/bin/bash into all test scripts.
Most of the tests will not work in other default shells like
on Freebsd or Solaris. So we make /bin/bash default now.
2015-07-30 15:38:17 +00:00
be940cf970 testbench: made work on FreeBSD
bash "source" extension is not supported in FreeBSD default shell"
2015-07-15 09:33:31 +00:00
Rainer Gerhards
7340a8dfd1 Merge branch 'master' of https://github.com/janmejay/rsyslog into tmp
Conflicts:
	tests/Makefile.am
2015-07-14 10:03:42 +02:00
Rainer Gerhards
d95826fae9 testbench: slow down udp sending to prevent races 2015-07-07 12:08:00 +02:00