rsyslog/tests/imuxsock_logger.sh
Rainer Gerhards bbb793d140 testbench: improve imuxsock coverage
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.
2014-12-04 12:24:43 +01:00

16 lines
614 B
Bash
Executable File

echo \[imuxsock_logger.sh\]: test imuxsock
source $srcdir/diag.sh init
source $srcdir/diag.sh startup imuxsock_logger.conf
# send a message with trailing LF
logger -d -u testbench_socket test
# 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_logger.log
if [ ! $? -eq 0 ]; then
echo "imuxsock_logger.sh failed"
exit 1
fi;
source $srcdir/diag.sh exit