xref: /openbsd/regress/usr.sbin/syslogd/README (revision 2ca31160)
11f53c19fSbluhmRun syslogd regressions tests.  As only one syslogd can run per
21f53c19fSbluhmmachine, each test kills any syslogd first.  At the end the system's
31f53c19fSbluhmsyslogd gets restarted.
41f53c19fSbluhmThe test framework runs a client, and a server, and a syslogd.  The
51f53c19fSbluhmmessages are passed via the log socket or via UDP from the client
61f53c19fSbluhmto syslogd.  From there UDP transport is used to reach the server.
71f53c19fSbluhmAll processes write log files where the message has to show up.
81f53c19fSbluhmThe test arguments are kept in the args-*.pl files.
91f53c19fSbluhmThe content of a log file, the data sent to a pipe process and what
101f53c19fSbluhmthe server received are checked.  The invocation of the sendsyslog(2)
111f53c19fSbluhmsyscall is checked with ktrace, the open file descriptors of syslogd
121f53c19fSbluhmare checked with fstat.
13*2ca31160SbluhmWhen invoked with "make libevent", all tests are executed three
14*2ca31160Sbluhmtimes.  They pass the EVENT_NO...  environment variables over sudo
15*2ca31160Sbluhminto syslogd.  This way the select(2) and poll(2) and kqueue(2)
16*2ca31160Sbluhmbackend is tested.
171f53c19fSbluhm
181f53c19fSbluhmSUDO=sudo
191f53c19fSbluhmAs syslogd needs root privileges either run the tests as root or
201f53c19fSbluhmset this variable and run make as a regular user.  Only the code
211f53c19fSbluhmthat requires it, is run as root.
221f53c19fSbluhm
231f53c19fSbluhmKTRACE=ktrace
241f53c19fSbluhmSet this variable if you want a ktrace output from syslogd.  Note that
251f53c19fSbluhmktrace is invoked after sudo as sudo would disable it.
261f53c19fSbluhm
271f53c19fSbluhmSYSLOGD=/usr/src/usr.sbin/syslogd/obj/syslogd
281f53c19fSbluhmStart an alternative syslogd program that is not in the path.
29