From owner-svn-src-head@freebsd.org Tue Feb 2 16:12:41 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 DEE87A983AA; Tue, 2 Feb 2016 16:12:40 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE7A71593; Tue, 2 Feb 2016 16:12:40 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pa0-x232.google.com with SMTP id uo6so103102453pac.1; Tue, 02 Feb 2016 08:12:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=U3snnUyJbIoxLbRjPWFU8dTOCRdZOejKC6uOsE27Qc4=; b=DTL+ptIvSA7/fIi+jOCE3Bz9/RhHBbY5Afi6WTKI/o1dDIOH5KUBMZqisl0OZmpy8X 82RwyzFIS62KRENVvLbGUjEEOkpf/nmfjwL63zJYAKrTjzRlPiss5Byu1Cd07biYOdJz wROZPaJcjtSq76N5fks5aVNUVc4V86LnxFGqSzeINdbufmVXPm4DTxed98yr+qia0BWV n2K9tJQ4n40h8QWHDu1ykKTmxt4gak6eNVLG2wy91U5uFUfM4lak3IW7dtPssJk6JFg1 E6je/P8Wz+g9UzD0ej0+wSGDP9Xt6DGs5J8Ha7SNIQD8FQeUo/Q8nEKBoMfl3PJcUcpB Ao5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:reply-to:subject:references:to:cc:from :message-id:date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=U3snnUyJbIoxLbRjPWFU8dTOCRdZOejKC6uOsE27Qc4=; b=QC/sPfx1igS02TXE2W3rjFSW0ZICUxNTuEE3vZhcl6k3tJNGA0HbTPI4ffjEfvLuZo OgfNSsiWTVpId7fOqCvVDqTE9bbEbZYJGKo3uXk3CGJC8Rqudu4WBPP1U1j5io6CvUgj iYbMcZ7Gc3QOcJPR9n6IatvL+FLaaWHgWmJBvLsdYdf+4ZvgWeYNGylojBVvQNQqZaYm jN3BB7gAm/rZaBy868oOojMmUnbX5R2gsyzMoOmouzL/WNs97HLeVVrf08c1Jht6Ek3B 4gITQxBh915b5DwXS42QxM12ObPc3Z/0UtFCyxTlbzREigct8NFzLOHs97TmaplPysdn J53Q== X-Gm-Message-State: AG10YORK2PAok3mTy3g7yHkbkLaE2Y+lxhZbY30oMVzmRERpaLETEmKsSO0pcxjRB6bvCw== X-Received: by 10.66.155.167 with SMTP id vx7mr48427923pab.109.1454429558959; Tue, 02 Feb 2016 08:12:38 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:4c01:5dfa:1e09:7219? (2001-44b8-31ae-7b01-4c01-5dfa-1e09-7219.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:4c01:5dfa:1e09:7219]) by smtp.gmail.com with ESMTPSA id c9sm3628297pfd.90.2016.02.02.08.12.36 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Feb 2016 08:12:38 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r294778 - in head: lib/libc/sys sys/kern References: <201601260757.u0Q7viGW029949@repo.freebsd.org> <56A73806.4080800@FreeBSD.org> <20160126204713.P1692@besplex.bde.org> To: Bruce Evans Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Kubilay Kocak Message-ID: <56B0D56E.6000501@FreeBSD.org> Date: Wed, 3 Feb 2016 03:12:30 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <20160126204713.P1692@besplex.bde.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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, 02 Feb 2016 16:12:41 -0000 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