summaryrefslogtreecommitdiffstats
path: root/tests/imuxsock_ccmiddle_root.sh
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-02-28 16:23:18 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-02-28 16:23:18 +0100
commitc0f92325c634fd3d0482f5d8bdc6650ab725cce1 (patch)
tree87073391e08087a17d2088b14523cdb63e57b524 /tests/imuxsock_ccmiddle_root.sh
parentbf088c5c2ed06db1c765a96df3762a00ae44db9c (diff)
parent74a71e798efd58e20cc150b04de2613bf518eed4 (diff)
downloadrsyslog-c0f92325c634fd3d0482f5d8bdc6650ab725cce1.tar.gz
rsyslog-c0f92325c634fd3d0482f5d8bdc6650ab725cce1.tar.xz
rsyslog-c0f92325c634fd3d0482f5d8bdc6650ab725cce1.zip
Merge branch 'master' into master-tcpsrv-mt
Diffstat (limited to 'tests/imuxsock_ccmiddle_root.sh')
-rwxr-xr-xtests/imuxsock_ccmiddle_root.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/imuxsock_ccmiddle_root.sh b/tests/imuxsock_ccmiddle_root.sh
new file mode 100755
index 00000000..b487611a
--- /dev/null
+++ b/tests/imuxsock_ccmiddle_root.sh
@@ -0,0 +1,18 @@
+# note: we must be root and no other syslogd running in order to
+# carry out this test
+echo \[imuxsock_ccmiddle_root.sh\]: test trailing LF handling in imuxsock
+echo This test must be run as root with no other active syslogd
+source $srcdir/diag.sh init
+source $srcdir/diag.sh startup imuxsock_ccmiddle_root.conf
+# send a message with trailing LF
+./syslog_inject -c
+# the sleep below is needed to prevent too-early termination of rsyslogd
+./msleep 100
+source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
+source $srcdir/diag.sh wait-shutdown # we need to wait until rsyslogd is finished!
+cmp rsyslog.out.log $srcdir/resultdata/imuxsock_ccmiddle.log
+if [ ! $? -eq 0 ]; then
+echo "imuxsock_ccmiddle_root.sh failed"
+exit 1
+fi;
+source $srcdir/diag.sh exit