| 14dce731 | 22-Jan-2026 |
Mark Johnston <markj@FreeBSD.org> |
syslogd/tests: Fix flakiness in forwarding tests
syslogd_start() waits for the local log socket to appear before returning, to ensure that the daemon is ready to handle log messages. Some tests star
syslogd/tests: Fix flakiness in forwarding tests
syslogd_start() waits for the local log socket to appear before returning, to ensure that the daemon is ready to handle log messages. Some tests start two daemons, so by default the socket already exists when the second daemon is started, so syslogd_start() returns early. The test subsequently sends a message to this second daemon, which sometimes isn't ready.
Define a separate log socket for the second daemon. Add a check to syslogd_start() to help catch this type of bug.
Reviewed by: jlduran MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54800
show more ...
|
| 92d25147 | 22-Jan-2026 |
Mark Johnston <markj@FreeBSD.org> |
syslogd/tests: Improve loopback interface initialization
- In syslogd_start(), assign the lo0 address in the specified jail. - Use the correct netmask.
Reviewed by: jlduran MFC after: 2 weeks Diffe
syslogd/tests: Improve loopback interface initialization
- In syslogd_start(), assign the lo0 address in the specified jail. - Use the correct netmask.
Reviewed by: jlduran MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54799
show more ...
|
| 560c2293 | 22-Jan-2026 |
Mark Johnston <markj@FreeBSD.org> |
syslogd/tests: Address races
I occasionally see failures in the syslogd test suite. The problem is that the tests are racy: they send a message using logger(1), then immediately check whether the m
syslogd/tests: Address races
I occasionally see failures in the syslogd test suite. The problem is that the tests are racy: they send a message using logger(1), then immediately check whether the message was logged to a log file. If the syslogd instance under test doesn't get a chance to run before the second step, the test fails.
This change reworks things to avoid the race while minimizing the amount of time sleeping. 1) Each test uses a single logfile, so have them use a new common variable, SYSLOGD_LOGFILE, instead of something test-specific. 2) In syslogd_start(), if the configuration references SYSLOGD_LOGFILE, wait for it to be created by syslogd before returning. 3) Add a helper syslogd_check_log(), to check for a given log entry in the last line of SYSLOGD_LOGFILE, instead of using atf_check directly. 4) In syslogd_check_log(), poll the logfile until the desired log entry appears, or the test times out.
With this change, I was able to run the tests 1000 times in a loop with 4-way parallelism without seeing any test failures. Without the change I usually get a failure within 10 loops.
Reviewed by: jlduran MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54779
show more ...
|
| b872bb72 | 27-Nov-2024 |
Jake Freeland <jfree@FreeBSD.org> |
syslogd: Split up basic test case
The basic case previously tested if messages are correctly logged over UNIX, INET, and INET6 transport. This single case can be split up into three separate cases t
syslogd: Split up basic test case
The basic case previously tested if messages are correctly logged over UNIX, INET, and INET6 transport. This single case can be split up into three separate cases to decrease code complexity and offer more granular results.
Both INET and INET6 cases will be skipped if the kernel does not support the corresponding transport.
Reviewed by: zlei, markj Differential Revision: https://reviews.freebsd.org/D47650
show more ...
|