7 Commits

Author SHA1 Message Date
Jeff Marckel
f604d5269b imjournal: remove strcat call 2020-02-27 11:52:32 -06:00
Rainer Gerhards
367b4d1c59
testbench: fix imjournal tests; add imjournal valgrind test
see also https://github.com/rsyslog/rsyslog/issues/3433
2019-01-24 14:26:14 +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
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