opnsense-src/lib/libc/tests
Bryan Drewery 8f8a794775 getdelim(3): Fix losing data on [EAGAIN]
Currently when an [EAGAIN] is encountered we return a partial result
that does not contain the delimeter.  On the next (successful) read we
were returning the next part of the line without the preceding string
from the first failed call.

Fix this by using the same mechanism as ungetc(3) does.  For the buffered
case we could simply set fp->_r and fp->_p back to their values before
sappend() is ran but for simplicity ungetc(3) is done in there as well.

Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D31687
2021-09-02 11:26:26 -07:00
..
c063 Provide O_SEARCH 2020-02-02 16:34:57 +00:00
db DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
gen libc: tests: hook CPUSET(9) test up to the build 2020-12-31 12:26:01 -06:00
hash DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
iconv lib/libc/tests/iconv: raise WARNS to 6 2020-09-24 21:42:44 +00:00
inet DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
locale DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
net Fix filename to avoid skipping lib/libc/net/servent test. 2019-07-15 23:41:00 +00:00
nss libc/nss tests: Add regression tests for commit 55444c823e1f 2021-01-21 14:30:19 -05:00
regex build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00
resolv resolv_test: Fix racy exit check, remove mutexes, and reduce output 2021-03-30 15:00:18 +01:00
rpc DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
setjmp DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ssp Allow using sanitizers for ssp tests with out-of-tree compiler 2021-03-12 17:15:33 +00:00
stdio getdelim(3): Fix losing data on [EAGAIN] 2021-09-02 11:26:26 -07:00
stdlib Remove remaining uses of ${COMPILER_FEATURES:Mc++11} 2021-01-19 21:37:36 +00:00
string Avoid copying too much from the input string. 2019-07-19 23:58:30 +00:00
sys jail: allow root to implicitly widen its cpuset to attach 2021-03-01 12:38:31 -06:00
termios DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
time DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
tls DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
tls_dso Update Makefile.depend files 2019-12-11 17:37:53 +00:00
ttyio DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
Makefile Connect libc/tests/time to the build, adding test cases for strptime() 2018-10-30 02:37:23 +00:00
Makefile.depend
Makefile.netbsd-tests