diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-27 11:29:47 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-27 11:29:47 +0200 |
commit | a900a7c34b674573f4b86350af0d68838da6550a (patch) | |
tree | 2915594fc1feeaddc31e690f29608cd1bc94da32 /tests/diskqueue.sh | |
parent | ddf74cc165c828139632170224356175c9c24e96 (diff) | |
download | rsyslog-a900a7c34b674573f4b86350af0d68838da6550a.tar.gz rsyslog-a900a7c34b674573f4b86350af0d68838da6550a.tar.xz rsyslog-a900a7c34b674573f4b86350af0d68838da6550a.zip |
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.
Diffstat (limited to 'tests/diskqueue.sh')
-rwxr-xr-x | tests/diskqueue.sh | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/tests/diskqueue.sh b/tests/diskqueue.sh index eabfcf78..bf1a46fd 100755 --- a/tests/diskqueue.sh +++ b/tests/diskqueue.sh @@ -9,27 +9,10 @@ #export RSYSLOG_DEBUG="debug nostdout" #export RSYSLOG_DEBUGLOG="tmp" echo testing queue disk-only mode -rm -rf test-spool -mkdir test-spool -rm -f work rsyslog.out.log rsyslog.out.log.save # work files -../tools/rsyslogd -c4 -u2 -n -irsyslog.pid -M../runtime/.libs:../.libs -f$srcdir/testsuites/diskqueue.conf & -sleep 1 -echo "rsyslogd started with pid " `cat rsyslog.pid` +source $srcdir/diag.sh init +source $srcdir/diag.sh startup diskqueue.conf # 20000 messages should be enough - the disk test is slow enough ;) -./tcpflood 127.0.0.1 13514 1 20000 -if [ "$?" -ne "0" ]; then - echo "error during tcpflood! see rsyslog.out.log.save for what was written" - cp rsyslog.out.log rsyslog.out.log.save -fi -$srcdir/waitqueueempty.sh # wait until rsyslogd is done processing messages -kill `cat rsyslog.pid` -rm -f work -sort < rsyslog.out.log > work -./chkseq work 0 19999 -if [ "$?" -ne "0" ]; then - # rm -f work rsyslog.out.log - echo "sequence error detected" - exit 1 -fi -rm -f work rsyslog.out.log -rm -rf test-spool +source $srcdir/diag.sh tcpflood 127.0.0.1 13514 1 20000 +source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages +source $srcdir/diag.sh seq-check 0 19999 +source $srcdir/diag.sh exit |