~ubuntu-branches/ubuntu/precise/rsyslog/precise

« back to all changes in this revision

Viewing changes to tests/sndrcv_drvr.sh

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2011-11-07 13:54:56 UTC
  • mfrom: (16.1.25 sid)
  • Revision ID: package-import@ubuntu.com-20111107135456-cwt6mu19ski1h2qf
Tags: 5.8.6-1ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Run as rsyslog:rsyslog, set $FileOwner to syslog
  - Replace init script with debian/rsyslog.upstart.
  - debian/rsyslog.logrotate: Use reload command to restart rsyslog
  - debian/rsyslog.conf: enable $RepeatedMsgReduction 
    to avoid bloating the syslog file (LP #453444)
  - Add debian/rsyslog.dmesg.upstart to save initial dmesg into a file.
    Install it in debian/rules.
  - debian/50-default.conf: set of default rules for syslog (forwarded to
    Debian #603160). remove file in postrm on purge. manage with ucf.
  - debian/rules: build with LDFLAGS=""
* Dropped:
  - debian/patches/02-CVE-2011-3200.patch (fixed in upstream release)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# This is test driver for testing two rsyslog instances. It can be
2
 
# utilized by any test that just needs two instances with different
3
 
# config files, where messages are injected in instance TWO and 
4
 
# (with whatever rsyslog mechanism) being relayed over to instance ONE,
5
 
# where they are written to the log file. After the run, the completeness
6
 
# of that log file is checked.
7
 
# The code is almost the same, but the config files differ (probably greatly)
8
 
# for different test cases. As such, this driver needs to be called with the
9
 
# config file name ($2). From that name, the sender and receiver config file
10
 
# names are automatically generated. 
11
 
# So: $1 config file name, $2 number of messages
12
 
#
13
 
# A note on TLS testing: the current testsuite (in git!) already contains
14
 
# TLS test cases. However, getting these test cases correct is not simple.
15
 
# That's not a problem with the code itself, but rater a problem with
16
 
# synchronization in the test environment. So I have deciced to keep the
17
 
# TLS tests in, but not yet actually utilize them. This is most probably
18
 
# left as an excercise for future (devel) releases. -- rgerhards, 2009-11-11
19
 
#
20
 
# added 2009-11-11 by Rgerhards
21
 
# This file is part of the rsyslog project, released  under GPLv3
22
 
# uncomment for debugging support:
23
 
source $srcdir/diag.sh init
24
 
# start up the instances
25
 
#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
26
 
#export RSYSLOG_DEBUGLOG="log"
27
 
source $srcdir/diag.sh startup $1_rcvr.conf 
28
 
source $srcdir/diag.sh wait-startup
29
 
#export RSYSLOG_DEBUGLOG="log2"
30
 
#valgrind="valgrind"
31
 
source $srcdir/diag.sh startup $1_sender.conf 2
32
 
source $srcdir/diag.sh wait-startup 2
33
 
# may be needed by TLS (once we do it): sleep 30
34
 
 
35
 
# now inject the messages into instance 2. It will connect to instance 1,
36
 
# and that instance will record the data.
37
 
source $srcdir/diag.sh tcpflood -m$2 -i1
38
 
sleep 2 # make sure all data is received in input buffers
39
 
# shut down sender when everything is sent, receiver continues to run concurrently
40
 
# may be needed by TLS (once we do it): sleep 60
41
 
source $srcdir/diag.sh shutdown-when-empty 2
42
 
source $srcdir/diag.sh wait-shutdown 2
43
 
# now it is time to stop the receiver as well
44
 
source $srcdir/diag.sh shutdown-when-empty
45
 
source $srcdir/diag.sh wait-shutdown
46
 
 
47
 
# may be needed by TLS (once we do it): sleep 60
48
 
# do the final check
49
 
source $srcdir/diag.sh seq-check 1 $2
 
1
source $srcdir/sndrcv_drvr_noexit.sh $1 $2
50
2
source $srcdir/diag.sh exit