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 10*29e70a6fSbluhmthe server received are checked. Logging to /dev/console is tested 11*29e70a6fSbluhmwith console redirection. Logging to a user's tty is tested with 12*29e70a6fSbluhma fake login. The invocation of the sendsyslog(2) syscall is checked 13*29e70a6fSbluhmwith ktrace, the open file descriptors of syslogd are checked with 14*29e70a6fSbluhmfstat. 152ca31160SbluhmWhen invoked with "make libevent", all tests are executed three 162ca31160Sbluhmtimes. They pass the EVENT_NO... environment variables over sudo 172ca31160Sbluhminto syslogd. This way the select(2) and poll(2) and kqueue(2) 182ca31160Sbluhmbackend is tested. 19a0156d40SbluhmIf the rsyslog package is installed, messages are sent to the 20a0156d40Sbluhmrsyslogd to test interoperability. This is especially useful for 21a0156d40SbluhmTCP and TLS. 221f53c19fSbluhm 231f53c19fSbluhmSUDO=sudo 241f53c19fSbluhmAs syslogd needs root privileges either run the tests as root or 251f53c19fSbluhmset this variable and run make as a regular user. Only the code 261f53c19fSbluhmthat requires it, is run as root. 271f53c19fSbluhm 281f53c19fSbluhmKTRACE=ktrace 291f53c19fSbluhmSet this variable if you want a ktrace output from syslogd. Note that 301f53c19fSbluhmktrace is invoked after sudo as sudo would disable it. 311f53c19fSbluhm 321f53c19fSbluhmSYSLOGD=/usr/src/usr.sbin/syslogd/obj/syslogd 331f53c19fSbluhmStart an alternative syslogd program that is not in the path. 34