svn commit: r294778 - in head: lib/libc/sys sys/kern
Kubilay Kocak
koobs at FreeBSD.org
Tue Feb 2 16:12:41 UTC 2016
On 26/01/2016 10:38 PM, Bruce Evans wrote:
> On Tue, 26 Jan 2016, Kubilay Kocak wrote:
>
>>> Log:
>>> Restore flushing of output for revoke(2) again. Document revoke()'s
>>> intended behaviour in its man page. Simplify tty_drain() to match.
>>> Don't call ttydevsw methods in tty_flush() if the device is gone
>>> since we now sometimes call it then.
>>> ...
>>> This was first broken then fixed in 1995. I changed only the tty
>>> ...
>>
>> Seems like
>>
>>> This was next broken in 1997 then fixed in 1998. Importing Lite2 made
>>> ...
>>
>> A fantastic
>>
>>> This was next broken in 2008 by replacing everything in tty.c and not
>>> ...
>>
>> Regression test candidate :)
>>
>>> It is now possible to fix this better using the new FREVOKE flag.
>
> Regression tests for devices are difficult to write and more difficult
> to run. Simpler for ttys than for networking or disks, but you still
> need at least 2 generic tty ports just to test things that are not
> very related to hardware.
Of course, though perhaps mocking external subsystems/components is
something we could do, as is relatively standard for testing only the
code you want to cover, rather than (requiring) the entire integration.
> Bugs in flushing and draining are sometimes obvious by observing if
> echo 123 >/dev/ttyXx works when it should fail or fails when it should
> work.
>
> For more arcane bugs, I use the old NIST POSIX test suite. This is
> badly written and hard to use and not very complete, but it finds about
> 30 regressions between FreeBSD-5 and FreeBSD-9. 30 over-counts for error
> cascades but undercounts for blocking and some other timing bugs, and
> of course strict POSIX tests don't get near FreeBSD features like
> revoke() or bidrectional devices.
>
> Bruce
More information about the svn-src-all
mailing list