freebsd-src/sbin/devd
Mark Johnston 30cafaa961 devd tests: Fix client_test
The loop doesn't check for overflow of the event buffer, which can
easily happen if other tests are running in parallel (the bectl tests in
particular trigger devd events).

When that overflow occurs, a funny thing can happen: the loop ends up
trying to read 0 bytes from the socket, succeeds, and then prints its
buffer to stdout.  It does this as fast as possible, eventually timing
out.  Then, because kyua wants to log the test's output, it slurps the
output file into memory so that it can insert it into the test db.  This
output file is quite large, usually around 8GB when I see it happen, and
is large enough to trigger an OOM kill in my test suite runner VM.

Fix the test: use a larger buffer and fail the test if we fill it before
both events are observed.  Also don't print the output buffer on every
loop iteration, since unlike the seqpacket test that will just print the
same output over and over.

Reviewed by:	imp, asomers
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D47625
2024-11-21 18:55:13 +00:00
..
tests devd tests: Fix client_test 2024-11-21 18:55:13 +00:00
apple.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
asus.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
autofs.conf man filesystems: fix more xrefs after move to s4 2024-06-27 18:32:05 -06:00
bluetooth.conf
devd.8 Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
devd.cc sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
devd.conf devd: autofs: Move autofs related events to a separate file 2023-11-24 10:45:03 +01:00
devd.conf.5 devd: Add directory information 2024-03-06 18:38:59 -07:00
devd.h
devd.hh
devmatch.conf devd: Improve devmatch support 2023-10-27 15:24:19 -06:00
dhclient.conf
hyperv.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
moused.conf
parse.y
power_profile.conf
syscons.conf
token.l
uath.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ulpt.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
zfs.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00