1
# This tests basic omuxsock functionality. A socket receiver is started which sends
2
# all data to an output file, then a rsyslog instance is started which generates
3
# messages and sends them to the unix socket. Datagram sockets are being used.
4
# added 2010-08-06 by Rgerhards
5
echo ===============================================================================
6
echo \[uxsock_simple.sh\]: simple tests for omuxsock functionality
8
# create the pipe and start a background process that copies data from
9
# it to the "regular" work file
10
source $srcdir/diag.sh init
11
./uxsockrcvr -srsyslog-testbench-dgram-uxsock -orsyslog.out.log &
13
echo background uxsockrcvr process id is $BGPROCESS
15
# now do the usual run
16
source $srcdir/diag.sh startup uxsock_simple.conf
17
# 10000 messages should be enough
18
source $srcdir/diag.sh injectmsg 0 10000
19
source $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
20
source $srcdir/diag.sh wait-shutdown
22
# wait for the cp process to finish, do pipe-specific cleanup
23
echo shutting down uxsockrcvr...
24
# TODO: we should do this more reliable in the long run! (message counter? timeout?)
27
echo background process has terminated, continue test...
29
# and continue the usual checks
30
source $srcdir/diag.sh seq-check 0 9999
31
source $srcdir/diag.sh exit