Date: Wed, 3 Feb 2016 03:12:30 +1100 From: Kubilay Kocak <koobs@FreeBSD.org> To: Bruce Evans <brde@optusnet.com.au> Cc: Konstantin Belousov <kib@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294778 - in head: lib/libc/sys sys/kern Message-ID: <56B0D56E.6000501@FreeBSD.org> In-Reply-To: <20160126204713.P1692@besplex.bde.org> References: <201601260757.u0Q7viGW029949@repo.freebsd.org> <56A73806.4080800@FreeBSD.org> <20160126204713.P1692@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56B0D56E.6000501>