tail: Add regression tests for -f and -FSponsored by: The FreeBSD Foundation(cherry picked from commit 58b1a126b98f9d64f30246c90d6c049fd78dda6b)
Drop "All rights reserved" from the files I ownAlso, add SPDX tags where needed.MFC after: 2 weeks
tail: fix "tail -r" for piped input that begins with '\n'A subtle logic bug, probably introduced in r311895, caused tail to print thefirst two lines of piped input in forward order, if the very fi
tail: fix "tail -r" for piped input that begins with '\n'A subtle logic bug, probably introduced in r311895, caused tail to print thefirst two lines of piped input in forward order, if the very first characterwas a newline.PR: 222671Reported by: Jim Long <[email protected]>, [email protected]MFC after: 3 weeksSponsored by: Spectra Logic Corp
show more ...
DIRDEPS_BUILD: Connect new directories.Sponsored by: Dell EMC Isilon
Unbreak :broken_pipe- Capture exit code in pipeline and test in output.- Drop awk use in favor of `sleep 2`. This helps guarantee the EPIPE behavior without the potential race.
Check result of seq call and save output via atf_check -oThis ensures that seq outputting to ints will not fail as silently if there'san error.
tail(1): Do not print bogus errno stringIn the case where write(2) does not return -1, it does not initialize errno.This can happen when a broken pipe causes a short write.I attempted to adapt t
tail(1): Do not print bogus errno stringIn the case where write(2) does not return -1, it does not initialize errno.This can happen when a broken pipe causes a short write.I attempted to adapt the submitted test case to ATF but could not figure outhow to make the test run in the ATF environment. So the aborted test isleft disabled, in case someone would like to run it manually or fix it.PR: 221976Submitted by: <martin AT lispworks.com> (earlier version)Sponsored by: Dell EMC Isilon
Fix memory leaks during "tail -r" of an irregular file* Rewrite r_buf to use standard tail queues instead of a hand-rolled circular linked list. Free dynamic allocations when done.* Remove an op
Fix memory leaks during "tail -r" of an irregular file* Rewrite r_buf to use standard tail queues instead of a hand-rolled circular linked list. Free dynamic allocations when done.* Remove an optimization for the case where the file is a multiple of 128KB in size and there is a scarcity of memory.* Add ATF tests for "tail -r" and its variants.Reported by: ValgrindReviewed by: ngieMFC after: 4 weeksSponsored by: Spectra Logic CorpDifferential Revision: https://reviews.freebsd.org/D9067