mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 02:40:42 +01:00
so far, all test required root privileges, which made testing quite complicated and resulted in no testing of this module on the testbench machines at all. Now we can also run without root privileges. To support the new tests, test tools were also improved.
16 lines
683 B
Bash
Executable File
16 lines
683 B
Bash
Executable File
echo \[imuxsock_ccmiddle.sh\]: test trailing LF handling in imuxsock
|
|
source $srcdir/diag.sh init
|
|
source $srcdir/diag.sh startup imuxsock_ccmiddle.conf
|
|
# send a message with trailing LF
|
|
./syslog_caller -fsyslog_inject-c -m1 -C "uxsock:testbench_socket"
|
|
# 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
|