opnsense-src/lib/libc/tests/sys
Enji Cooper c90e23db39 Make server_cat(..) handle short receives
In short, the prior code was far too simplistic when it came to calling recv(2)
and failed intermittently (or in the case of Jenkins, deterministically).

Handle short recv(2)s by checking the return code and incrementing the window
into the buffer by the number of received bytes. If the number of received
bytes <= 0, then bail out of the loop, and test the total number of received
bytes vs the expected number of bytes sent for equality, and base whether or
not the test passes/fails on that fact.

Remove the expected failure, now that the hdtr testcases deterministically pass
on my host after this change [1].

PR:		234809 [1], 235200
Reviewed by:	asomers
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D19188
2019-02-19 22:19:31 +00:00
..
brk_test.c Reimplement brk() and sbrk() to avoid the use of _end. 2018-06-04 19:35:15 +00:00
Makefile Add [initial] functional tests for sendfile(2) as lib/libc/sys/sendfile 2019-01-23 22:00:17 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mlock_helper.c style(9): sort the #includes 2017-03-09 09:25:11 +00:00
queue_test.c Add some initial tests for SLIST and STAILQ macros 2015-11-16 04:15:39 +00:00
sendfile_test.c Make server_cat(..) handle short receives 2019-02-19 22:19:31 +00:00