Page MenuHomeFreeBSD

Prevent running syslogd tests in parallel
ClosedPublic

Authored by olivier on Sep 26 2023, 7:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 10:40 PM
Unknown Object (File)
Wed, Oct 16, 1:16 AM
Unknown Object (File)
Oct 13 2024, 5:21 PM
Unknown Object (File)
Oct 11 2024, 9:07 PM
Unknown Object (File)
Oct 10 2024, 4:21 PM
Unknown Object (File)
Oct 8 2024, 1:36 PM
Unknown Object (File)
Oct 6 2024, 10:41 PM
Unknown Object (File)
Oct 4 2024, 6:29 PM
Subscribers

Details

Summary

If parallel mode enabled, those tests are unstable (need multiples runs before to hit conflict).

Test Plan

Example without the patch:

echo "parallelism=8" >> /etc/kyua/kyua.conf
# cd /usr/tests/usr.sbin/syslogd
# kyua test 

Standard output:
can't open /dev/klog (13)
bind: Address already in use
logmsg: pri 53, flags 0, from , msg bind: Address already in use
bind: Address already in use
logmsg: pri 53, flags 0, from , msg bind: Address already in use
Trying peer: /tmp/kyua.JtFs4n/2/work/log.sock
new socket fd is 5
listening on socket
sending on socket
Trying peer: /tmp/kyua.JtFs4n/2/work/logpriv.sock
new socket fd is 6
listening on socket
sending on socket
off & running....
init

loading timezone data via tzset()
cfline("user.debug      /tmp/kyua.JtFs4n/2/work/basic.log", f, "*", "*", "*")
X 7 X X X X X X X X X X X X X X X X X X X X X X X FILE: /tmp/kyua.JtFs4n/2/work/basic.log
logmsg: pri 56, flags 0, from bigone, msg restart
syslogd: restarted
logmsg: pri 6, flags 0, from bigone, msg kernel boot file is /boot/kernel/kernel
kernel boot file is /boot/kernel/kernel
Executing command [ logger -p user.debug -t basic -h /tmp/kyua.JtFs4n/2/work/log.sock hello, world (unix) ]
received sa_len = 16
logmsg: pri 17, flags 0, from bigone, msg hello, world (unix)
Logging to FILE /tmp/kyua.JtFs4n/2/work/basic.log
Executing command [ tail -n 1 /tmp/kyua.JtFs4n/2/work/basic.log ]
Executing command [ logger -4 -p user.debug -t basic -h 127.0.0.1 -P 5140 hello, world (v4) ]
Executing command [ tail -n 1 /tmp/kyua.JtFs4n/2/work/basic.log ]

Standard error:
Fail: regexp basic: hello, world \(v4\) not in stdout
Sep 26 21:25:42 bigone basic: hello, world (unix)
Files left in work directory after failure: basic.log, conf.txt, log.sock, logpriv.sock, syslog.conf, syslogd.pid
pkill: Cannot get process list (kvm_getprocs: No such process)
===> Failed tests
syslogd_test:basic  ->  failed: atf-check failed; see the output of the test for details  [0.129s]

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

olivier created this revision.
usr.sbin/syslogd/tests/Makefile
2

We should have a comment explaining why. In this case I think it's because syslogd is listening on a UDP port (5140).

olivier marked an inline comment as done.
This revision is now accepted and ready to land.Oct 10 2023, 11:06 PM
This revision was automatically updated to reflect the committed changes.