tests: Avoid sleep when causing a write errorCause a write error using a fifo and wait, rather than needing a sleepto wait for something to terminate. This is faster and avoids apotential test fa
tests: Avoid sleep when causing a write errorCause a write error using a fifo and wait, rather than needing a sleepto wait for something to terminate. This is faster and avoids apotential test failure on a heavily loaded system.Using /dev/full would be simpler, but it is not portable enough (ittends not to be available in jails, even). Starting programs with stdoutnot open or only open for read/execute/search may have unexpected sideeffects.Reviewed by: ngie, desDifferential Revision: https://reviews.freebsd.org/D57213
show more ...
Improve reliability of stdout tests.If the test runner is under heavy load, the command we are testing maysucceed in printing to stdout before the dummy receiver has terminated.Add a short delay
Improve reliability of stdout tests.If the test runner is under heavy load, the command we are testing maysucceed in printing to stdout before the dummy receiver has terminated.Add a short delay to reduce the likelihood of this happening.MFC after: 1 weekSponsored by: Klara, Inc.Reviewed by: markjDifferential Revision: https://reviews.freebsd.org/D47572
Update Makefile.depend filesAfter building packages we have a number of newand updated Makefile.depend filesReviewed by: stevek
asa: Rewrite to fix line termination issue.The standard is somewhat unclear, but on the balance, I believe that thephrase “the rest of the input line” should be interpreted to mean therest of the
asa: Rewrite to fix line termination issue.The standard is somewhat unclear, but on the balance, I believe that thephrase “the rest of the input line” should be interpreted to mean therest of the input line including the terminating newline if and only ifthere is one. This means the current implementation is incorrect on twopoints:- First, it suppresses the previous line's newline in the '1' case.- Second, it unconditionally emits a newline at the end of the output for non-empty input, even if the input did not end with a newline.Resolve this by rewriting the main loop. Instead of special-casing thefirst line and then assuming that every line ends with a newline, weremember how each line ends and emit that either at the beginning ofthe next line or at the end of the file except in the one case ('+')where the standard explicitly says not to.While here, try to reduce diff to upstream a little and update theirRCS tag to reflect the fact that while we've diverged significantlyfrom them, we've incorporated all their changes. Remove the uselesssecond RCS tag.We also update the tests to account for the change in interpretationof the '1' case and add a test case for unterminated input.MFC after: 1 weekSponsored by: Klara, Inc.Reviewed by: kevansDifferential Revision: https://reviews.freebsd.org/D43326
asa: Add some unit tests.MFC after: 1 weekSponsored by: Klara, Inc.Reviewed by: markjDifferential Revision: https://reviews.freebsd.org/D40564