23 Commits

Author SHA1 Message Date
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
f48b10383d
queue bugfix: invalid error message on queue startup
due to some old regression (commit not exactly identified, but for
sure a regression, 9 years ago it was correct) an error message
is emitted when no .qi file exists on startup of the queue, which
is a normal condition.

Actually, the code should not have tried to open the .qi file in
the first place because it detected that it did not exist. That
(necessary) shortcut had been removed a while ago.

closes https://github.com/rsyslog/rsyslog/issues/3117
2018-10-22 12:21:58 +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
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
00d2e47530 cosmetic: add test headers to some tests
actually a bit more than cosmetic - makes it easier to see what failed
2013-11-07 09:07:44 +01:00
Rainer Gerhards
8b9cef552d Merge branch 'v4-stable' into v5-stable
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	runtime/debug.c
	runtime/stream.c
	tests/Makefile.am
	tests/diskqueue.sh
	tests/nettester.c
	tools/omfile.c
2010-03-29 11:07:15 +02:00
Rainer Gerhards
4408d4137a testbench: new calling interface for tcpflood
this is a perquisite to support more flexible testing modes, which
could not intelligently be implemented with the old interface
2010-03-10 11:07:26 +01:00
Rainer Gerhards
6c43f93022 fixed regression introduced with previous commit
disk queue mode did no longer work correctly. A side-effect of
this commit here is slightly cleaned-up (and more elegant) code
for circular files.
2010-03-10 09:52:49 +01:00
Rainer Gerhards
9079f66830 improved testbench
- added a test to check handling of damaged .qi files on startup
- made sure each test identifies itself on startup
2009-10-21 15:17:19 +02:00
Rainer Gerhards
b37a1eb0f8 omfile itself no longer needs zlib 2009-07-02 17:06:00 +02:00
Rainer Gerhards
b2fa740b9a optimized TAG handling 2009-06-23 17:14:42 +02:00
Rainer Gerhards
1f874c2208 fixed small bug in testbench 2009-06-12 17:46:16 +02:00
Rainer Gerhards
58e707b441 backported some of the v5 testbench
this permits us to keep a persistent test environment between
v4 and v5, most importantly using the same tools. As far as the
actual tests are concerned, some had issues. I had no time to check
if that was an issue with the test or an actual issue with the
v3/4 engine. Will do that at some later stage.
2009-06-04 09:57:45 +02:00
Rainer Gerhards
a900a7c34b greatly enhanced testbench
The imdiag module now can very effectively inject messages, which also
frees us from uncertainties of tcp reception and processing. All shell
script based tests have been modularized, what makes it far easier to
create new tests. Also, the test bench now executes more reliable and
much faster, because we can now rely on actual engine information where
we previously did just a dumb sleep.
2009-05-27 11:29:47 +02:00
Rainer Gerhards
7a7ec37f99 improved testbench / solved imdiag race condition
imdiag/imtcp had a modload race condition (as imdiag is a testing aid,
this has no implications for production deployments). Also, I replaced
netcat by a custom program to talk to imdiag. This, for the first time ever,
is now a Java program. I plan to add some GUI troubleshooting tools and
thought it is a good idea to start doing things in Java that can simply
be done in that language.
2009-05-25 13:02:06 +02:00
Rainer Gerhards
eb1615068c added new testing module imdiag
which enables to talk to the rsyslog core at runtime. The current
implementation is only a beginning, but can be expanded over time
2009-05-25 10:47:22 +02:00
Rainer Gerhards
1fb5cee04d improved testbench - added tests for queue disk-only mode 2009-04-17 17:53:33 +02:00