| #
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 ...
|
| #
8cc248fb
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add rfc3164-strict format option
The syslogd bsd/rfc3164 message format does not strictly conform to the format recommended in RFC 3164 when syslog messages are forwarded from remote hosts.
syslogd: Add rfc3164-strict format option
The syslogd bsd/rfc3164 message format does not strictly conform to the format recommended in RFC 3164 when syslog messages are forwarded from remote hosts.
The new rfc3164-strict format generates messages that conform with the RFC 3164 recommended format. The existing format is maintained for backwards compatibility.
PR: 220246 Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
show more ...
|
| #
ee75c991
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add syslog forwarded message format tests
Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
|
| #
66a022a3
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add syslog basic message format tests
RFC 3164 and RFC 5424 syslog message format tests and minor refactor of existing tests to reuse components in new tests.
Reviewed by: markj MFC after:
syslogd: Add syslog basic message format tests
RFC 3164 and RFC 5424 syslog message format tests and minor refactor of existing tests to reuse components in new tests.
Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
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 ...
|
| #
8cc248fb
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add rfc3164-strict format option
The syslogd bsd/rfc3164 message format does not strictly conform to the format recommended in RFC 3164 when syslog messages are forwarded from remote hosts.
syslogd: Add rfc3164-strict format option
The syslogd bsd/rfc3164 message format does not strictly conform to the format recommended in RFC 3164 when syslog messages are forwarded from remote hosts.
The new rfc3164-strict format generates messages that conform with the RFC 3164 recommended format. The existing format is maintained for backwards compatibility.
PR: 220246 Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
show more ...
|
| #
ee75c991
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add syslog forwarded message format tests
Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
|
| #
66a022a3
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add syslog basic message format tests
RFC 3164 and RFC 5424 syslog message format tests and minor refactor of existing tests to reuse components in new tests.
Reviewed by: markj MFC after:
syslogd: Add syslog basic message format tests
RFC 3164 and RFC 5424 syslog message format tests and minor refactor of existing tests to reuse components in new tests.
Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
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 ...
|
| #
8cc248fb
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add rfc3164-strict format option
The syslogd bsd/rfc3164 message format does not strictly conform to the format recommended in RFC 3164 when syslog messages are forwarded from remote hosts.
syslogd: Add rfc3164-strict format option
The syslogd bsd/rfc3164 message format does not strictly conform to the format recommended in RFC 3164 when syslog messages are forwarded from remote hosts.
The new rfc3164-strict format generates messages that conform with the RFC 3164 recommended format. The existing format is maintained for backwards compatibility.
PR: 220246 Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
show more ...
|
| #
ee75c991
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add syslog forwarded message format tests
Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
|
| #
66a022a3
|
| 23-Dec-2024 |
Michal Scigocki <michal.os@hotmail.com> |
syslogd: Add syslog basic message format tests
RFC 3164 and RFC 5424 syslog message format tests and minor refactor of existing tests to reuse components in new tests.
Reviewed by: markj MFC after:
syslogd: Add syslog basic message format tests
RFC 3164 and RFC 5424 syslog message format tests and minor refactor of existing tests to reuse components in new tests.
Reviewed by: markj MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1536
show more ...
|