22 Commits

Author SHA1 Message Date
Rainer Gerhards
8e4a6f4836
testbench: modernize some tests
This also makes port use more reliable.
2020-01-11 16:30:26 +01:00
Rainer Gerhards
991a450605
testbench: improve queue test
we also try to harden it against very slow machines - not sure if
the method really works well. Practice will show.
2019-02-22 18:02:12 +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
d051a9bdb6 squash: more changes 2018-09-02 17:46:16 +02:00
Rainer Gerhards
a43a03f17e
testbench: make more test file names dynamic
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
2018-08-29 10:46:32 +02:00
Rainer Gerhards
5a7d6009c7
testbench: some minor improvements
- 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
2018-08-19 08:35:19 +02:00
Rainer Gerhards
1ed6859dfd
testbench: replace hardcoded ports and improve cleanup handling
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.
2018-08-18 20:28:31 +02:00
Rainer Gerhards
d8b6dc52af
testbench: more modernization of testbench plumbing 2018-08-02 14:47:19 +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
Florian Riedl
e13dc61049 Test refactor part 6 2018-07-25 17:32:05 +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
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
83140cb480 fixed regressions in testsuite due to imported changes from last merge
... also bumped version number
2009-11-05 15:04:24 +01:00
Rainer Gerhards
5625dbd1b6 bugfix and testbench improvements
- bugfix: solved potential (temporary) stall of messages when the queue was
  almost empty and few new data added (caused testbench to sometimes hang!)
- fixed some race condition in testbench
- added more elaborate diagnostics to parts of the testbench
- solved a potential race inside the queue engine
2009-10-07 18:40:30 +02:00
Rainer Gerhards
13d4a23e92 some more fixes for queue engine
The enhanced testbench now runs without failures, again
2009-05-28 14:24:37 +02:00
Rainer Gerhards
fc3e56941c fixing an issue during DA mode queue shutdown
also changed DA queue mode in that the regular workers now run
concurrently.
2009-05-28 11:57:30 +02:00
Rainer Gerhards
affa217cc2 adapted testbench to new capabilities
... and now make check fails again, we have obviously found some new
bugs thanks to the additional cases
2009-05-27 12:52:28 +02:00
Rainer Gerhards
aa9426f683 solved design issue with queue termination
... and also improved the test suite. There is a design issue in the
v3 queue engine that manifested to some serious problems with the new
processing mode. However, in v3 shutdown may take eternally if a queue
runs in DA mode, is configured to preserve data AND the action fails and
retries immediately. There is no cure available for v3, it would
require doing much of the work we have done on the new engine. The window
of exposure, as one might guess from the description, is very small. That
is probably the reason why we have not seen it in practice.
2009-05-26 12:43:43 +02:00
Rainer Gerhards
a4dad20099 queue size calculation now based on logical/physical dequeue
... needed to split the old single counter into two. I wouldn't bet that
I made some mistakes while doing so, but at least some ad-hoc tests plus
the testbench do no longer indicate errors.
2009-05-19 11:03:09 +02:00
Rainer Gerhards
8159d0a117 fixed abort condition in DA mode 2009-04-23 16:02:42 +02:00
Rainer Gerhards
50174408b0 added test for DA queue mode (in main msg queue) - needs more work
The problem is that the rsyslog engine writes messages too quickly, so
that the queue never enters DA mode. We still have some look contemption.
One possible solution (hopefully) is to finally move the parser code out
of imtcp and onto the next thread. Need to address these issues first, then
come back to the test case.
2009-04-22 18:37:56 +02:00