| #
30cafaa9
|
| 21-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
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
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
show more ...
|
| #
1d386b48
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
30cafaa9
|
| 21-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
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
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
show more ...
|
| #
1d386b48
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
958160f3
|
| 23-May-2018 |
Eitan Adler <eadler@FreeBSD.org> |
devd: correct two warnings
- catching a polymorphic type by value - "output between 16 and 95 bytes into a destination of size 80"
|
| #
a123f26e
|
| 12-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
| #
2c6254c2
|
| 11-Apr-2016 |
Alan Somers <asomers@FreeBSD.org> |
Fix an intermittent bug in sbin/devd/client_test.stream
In case where the two events were being received in separate reads, the event buffer was being null-terminated at the wrong offset.
Also, fac
Fix an intermittent bug in sbin/devd/client_test.stream
In case where the two events were being received in separate reads, the event buffer was being null-terminated at the wrong offset.
Also, factored out some common code between the tests, and fixed a comment.
Submitted by: will MFC after: 3 days Sponsored by: Spectra Logic Corp
show more ...
|
| #
9268022b
|
| 19-Nov-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head@274682
|
| #
4e27d36d
|
| 17-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r271694
|
| #
832fd780
|
| 23-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r270409.
|
| #
81ade99c
|
| 20-Aug-2014 |
Alan Somers <asomers@FreeBSD.org> |
Misc fixes suggested by Coverity.
sbin/devd/tests/client_test.c * In the event that popen fails, don't dereference its return value. * Fix array overwrite in the stream and seqpacket tests. * Clo
Misc fixes suggested by Coverity.
sbin/devd/tests/client_test.c * In the event that popen fails, don't dereference its return value. * Fix array overwrite in the stream and seqpacket tests. * Close sockets at the end of successful ATF tests.
Reported by: Coverity scan CID: 1232019, 1232020, 1232029, 1232030 MFC after: 1 week Sponsored by: Spectra Logic
show more ...
|
| #
d8e198e6
|
| 15-Aug-2014 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Remove bogus ; at the end of the if condition in order to unbreak gcc builds after r270004.
MFC after: 4 days X-MFX with: r270004
|
| #
cdfa64aa
|
| 14-Aug-2014 |
Alan Somers <asomers@FreeBSD.org> |
Convert devd's client socket to type SOCK_SEQPACKET.
This change consists of two merges from projects/zfsd/head along with the addition of an ATF test case for the new functionality.
sbin/devd/test
Convert devd's client socket to type SOCK_SEQPACKET.
This change consists of two merges from projects/zfsd/head along with the addition of an ATF test case for the new functionality.
sbin/devd/tests/Makefile sbin/devd/tests/client_test.c Add ATF test cases for reading events from both devd socket types.
r266519: sbin/devd/devd.8 sbin/devd/devd.cc Create a new socket, of type SOCK_SEQPACKET, for communicating with clients. SOCK_SEQPACKET sockets preserve record boundaries, simplying code in the client. The old SOCK_STREAM socket is retained for backwards-compatibility with existing clients.
r269993: sbin/devd/devd.8 Fix grammar bug.
CR: https://reviews.freebsd.org/rS266519 MFC after: 5 days Sponsored by: Spectra Logic
show more ...
|
| #
958160f3
|
| 23-May-2018 |
Eitan Adler <eadler@FreeBSD.org> |
devd: correct two warnings
- catching a polymorphic type by value - "output between 16 and 95 bytes into a destination of size 80"
|
| #
a123f26e
|
| 12-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
| #
2c6254c2
|
| 11-Apr-2016 |
Alan Somers <asomers@FreeBSD.org> |
Fix an intermittent bug in sbin/devd/client_test.stream
In case where the two events were being received in separate reads, the event buffer was being null-terminated at the wrong offset.
Also, fac
Fix an intermittent bug in sbin/devd/client_test.stream
In case where the two events were being received in separate reads, the event buffer was being null-terminated at the wrong offset.
Also, factored out some common code between the tests, and fixed a comment.
Submitted by: will MFC after: 3 days Sponsored by: Spectra Logic Corp
show more ...
|
| #
9268022b
|
| 19-Nov-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head@274682
|
| #
4e27d36d
|
| 17-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r271694
|
| #
832fd780
|
| 23-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r270409.
|
| #
81ade99c
|
| 20-Aug-2014 |
Alan Somers <asomers@FreeBSD.org> |
Misc fixes suggested by Coverity.
sbin/devd/tests/client_test.c * In the event that popen fails, don't dereference its return value. * Fix array overwrite in the stream and seqpacket tests. * Clo
Misc fixes suggested by Coverity.
sbin/devd/tests/client_test.c * In the event that popen fails, don't dereference its return value. * Fix array overwrite in the stream and seqpacket tests. * Close sockets at the end of successful ATF tests.
Reported by: Coverity scan CID: 1232019, 1232020, 1232029, 1232030 MFC after: 1 week Sponsored by: Spectra Logic
show more ...
|
| #
d8e198e6
|
| 15-Aug-2014 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Remove bogus ; at the end of the if condition in order to unbreak gcc builds after r270004.
MFC after: 4 days X-MFX with: r270004
|
| #
cdfa64aa
|
| 14-Aug-2014 |
Alan Somers <asomers@FreeBSD.org> |
Convert devd's client socket to type SOCK_SEQPACKET.
This change consists of two merges from projects/zfsd/head along with the addition of an ATF test case for the new functionality.
sbin/devd/test
Convert devd's client socket to type SOCK_SEQPACKET.
This change consists of two merges from projects/zfsd/head along with the addition of an ATF test case for the new functionality.
sbin/devd/tests/Makefile sbin/devd/tests/client_test.c Add ATF test cases for reading events from both devd socket types.
r266519: sbin/devd/devd.8 sbin/devd/devd.cc Create a new socket, of type SOCK_SEQPACKET, for communicating with clients. SOCK_SEQPACKET sockets preserve record boundaries, simplying code in the client. The old SOCK_STREAM socket is retained for backwards-compatibility with existing clients.
r269993: sbin/devd/devd.8 Fix grammar bug.
CR: https://reviews.freebsd.org/rS266519 MFC after: 5 days Sponsored by: Spectra Logic
show more ...
|
| #
30cafaa9
|
| 21-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
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
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
show more ...
|
| #
1d386b48
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
958160f3
|
| 23-May-2018 |
Eitan Adler <eadler@FreeBSD.org> |
devd: correct two warnings
- catching a polymorphic type by value - "output between 16 and 95 bytes into a destination of size 80"
|