15 Commits

Author SHA1 Message Date
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
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
f94c20205d
testbench: re-enable journal test
... it looks like it was accidently kept in "skip" state
2018-10-29 13:52:51 +01:00
Rainer Gerhards
69ef6e329b fix bad bash coding style and disable shellcheck false positives
Also now permit interactivly running tests without explicitly setting
$srcdir. This now works if we are inside ./tests and fails, as before,
when we are in a different directory.

Detected by shellcheck via CodeFactor.io
2018-10-23 13:27:37 +02:00
Rainer Gerhards
9378945b9d
fix useless use of cat
more or less cosmetic here, but anyhow...

detected by shellcheck
2018-10-10 15:20:15 +02:00
Rainer Gerhards
a45f3af81d squash: wait until full startup so that imdiag.port exists 2018-09-05 09:21:42 +02:00
Rainer Gerhards
b5a385a13d testbench: modernize plumbing
another set of changes for testbench modernization
2018-09-02 17:29:39 +02:00
Rainer Gerhards
1eb5f12f4a
testbench: force sequence of execution for some tests (plus some nits)
also some smaller changes
- some cleanup in testbench tooling
- testbench: better diagnostics in journal test
  prototype change, may be propagated to other tests if it really turns
  out to be useful - but only the next time will show if it is...
- make imjournal-basic-vg.sh SKIP in successful run (but when fully done)
  This is an aid to address failures in imjournal-basic.sh, which
  experiences an odd bug that we suspect to be rooted inside the journal.
  see also https://github.com/rsyslog/rsyslog/issues/2931#issuecomment-414269118
2018-08-20 14:05:28 +02:00
Rainer Gerhards
223e5e9ced testbench: support dynamic pidfile naming
required for parallel test execution

This also fixes some previously not seen issues with HOSTNAME
file generation inside the test framework.
2018-08-15 08:28:11 +02:00
Rainer Gerhards
8ea166d89d
testbench: fix some hardcoded names (#2895)
* testbench: fix some hardcoded names

This is prework to make parallel execution of tests possible.
2018-08-01 12:52:17 +02:00
Jiri Vymazal
59e58b5ec8 Fetching cursor on readJournal() and simplified pollJournal()
Fetching journal cursor in persistJournal could cause us to save
invalid cursor leading to duplicating messages further on, when new
WorkAroundJournalBug option is set we are saving it on each
readJournal() where we now that the state is good.

pollJournal() is now cleaner and faster, correctly handles INVALIDATE
status from journald and is able to continue polling after journal
flush. Also reduced POLL_TIMEOUT a bit as it caused rsyslog to exit
with error in corner cases for some ppc when left at full second.

re-factored imjournal CI tests with journal_print tool to have more
detailed error reporting
2018-07-31 12:08:25 +02:00
Jiri Vymazal
534d79344b Added skip journal load on first run
When starting rsyslog with imjournal for first time it outputs
an error and plugin does not run because no state file exists yet.
Now it skips the loading and creates state file on first persist.
Also fixed imjournal tests to actually test plugin functionality.
2018-07-24 15:40:54 +02:00
Rainer Gerhards
2ba3c8ddde
testbench: modernize testbench plumbing
changes some of the test commands to use bash functions
includes some small bug fixes to tests where bugs were
previously not seen due to different plumbing.
2018-07-23 17:26:34 +02:00
Rainer Gerhards
92cdd28c76 testbench bugfix: journal tests did not actually check for success
For some unknown reason, the check if data really was forwarded from
the journal was missing.

see also https://github.com/rsyslog/rsyslog/issues/2564
2018-04-01 18:21:12 +02:00
Rainer Gerhards
d413df23d2 testbench: add valgrind-test for imjournal 2017-11-10 14:13:09 +01:00