Restart the program if it does not respond within timeout.
New setting 'confirmTimeout' (default 10 seconds).
Allow the program to provide keep-alive feedback when a
message requires long-running processing.
Improve efficiency when reading feedback line (use buffer).
Retry interrupted writes/reads to/from pipe.
New setting 'reportFailures' for reporting error messages
from the program.
Report child termination when writing to pipe.
Minor refactor: renamed writePipe function to sendMessage,
renamed readPipe to readStatus.
to wait for process startup, the rsyslog startup calles were (ab)used. This
caused issues whenever they were updated to new rsyslog needs. Now a dedicated
"API" for process startup has been added and the tests been modified to use it.
Capture program output using a pipe shared with all child processes,
and write to the file using a dedicated thread. Ensures lines emitted
by the child processes will not be intermingled in the output file if
the lines are less than PIPE_BUF chars long and are written in line-
buffered mode.
Reopen output file on HUP, to support external rotation of the file.
New setting 'fileCreateMode' as in omfile.
With these improvements the 'output' setting should now be usable for
production (it was originally intended only for debugging).
Redirect stdout/stderr of child process to /dev/null when not captured.
Closes#2787
Minor: simplify some test code: 'wait-startup' not needed after
'startup', 'wait-queueempty' not needed before 'shutdown_when_empty'.
The RSYSLOG_DYNNAME used to make test file unique was very long,
which potentially causes issues with some test scenarios.
see also: https://github.com/rsyslog/rsyslog/pull/2945#issuecomment-417078768
Also, the dynamic port determination method we currently use
is not 100% reliable. That port number was used inside the DYNNAME
and thus was not necessarily unique. This has now changed to the
current time in microseconds plus a hash of the test file name. This
should be sufficiently unique. If still not, we can now simply
extend the test_id program (e.g. read /dev/urandom).
This is required to support parallel test runs.
Among others, make thise files dynamic:
* test-spool
* rsyslog.input
* rsyslog.out*.log
* tmp.in
Also:
* convert presort test statement to function
* cleanup imfile truncation test
* cleanup imfile-growing-file-id test
some cruft was left due to copy and paste error
* serialize mysql tests
Merging in multiple steps to avoid getting new tests with non-correct
plumbing.
- some more dynamic file names
- convert more commands to pure bash functions
- cleanup no longer neede files
Fixed test configurations (socket timeouts with newer kafka).
Reactivated some kafka tests that work now.
omkafka: Fixed "closeTimeout" setting in action shutdown
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
discussion confirmed that not passing environment to called program
should be considered a bug and consequently no parameter to control
this behaviour is needed. I just added that parameter to be able
to carry on with testbench work, and this commit removes it. The
param was never part of any official relase.
closes https://github.com/rsyslog/rsyslog/issues/2921
- DEAD_PORT now uses unassigned IANA port unlike to be used on the system
(dynamic port querying is racy and we had at least once an issue, so we
can remove ambiguity here easily)
- replace some diag.sh commands by bash functions
Support tools (like tcpflood) are also upgraded to support the
necessary dynamic port.s
This is part of the effort to make parallel testing possible.
We move parts of the cleanup to the buildbot cleanup, as we cannot
clean out instances on each test when we run parallel tests.
This is work torward the ability to run the testbench in parallel.
Some small issues in tests have also been detected, which were not
previously seen. They have been fixed. We did not do separate
commits for this as it would clutter the commit log with not
really relevant info.
Also move some cleanup to "make clean" target
To support parallel testbench runs, we need to have dynamic work files.
So deleting work files on each test does not work, especially as we can
no longer assume they are "left-overs" from a failed test - they may
actually (and quite likely) belong to tests that run in parallel.
So the proper solution is to do via "make clean".
closes https://github.com/rsyslog/rsyslog/pull/2916
Write all of the original request metadata fields to $.omes for
the retry, if present. This may include all of the following:
_index, _type, _id, _parent, pipeline
This is in addition to the fields from the response. If the same
field name exists in the request metadata and the response, the
field from the request will be used, in order to facilitate
retrying the exact same request.
Have to set a tag with `MsgSetTAG` to avoid a UBSAN error.
this introduces symlink detection and following as well
as monitoring changes on them. Also added test for the new
functionality and ensuring the original symlink behavior
stays as well.