From owner-svn-src-head@freebsd.org Tue Jan 26 12:00:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11D8DA46100; Tue, 26 Jan 2016 12:00:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id D0BA6DC1; Tue, 26 Jan 2016 12:00:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 895831A2F36; Tue, 26 Jan 2016 22:38:36 +1100 (AEDT) Date: Tue, 26 Jan 2016 22:38:35 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Kubilay Kocak cc: Konstantin Belousov , 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 In-Reply-To: <56A73806.4080800@FreeBSD.org> Message-ID: <20160126204713.P1692@besplex.bde.org> References: <201601260757.u0Q7viGW029949@repo.freebsd.org> <56A73806.4080800@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=PfoC/XVd c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=VnRtmwVBtHlHhgADq_kA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2016 12:00:10 -0000 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. 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