From owner-svn-src-head@FreeBSD.ORG Wed Aug 1 19:29:58 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A57DD106566B; Wed, 1 Aug 2012 19:29:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 360E28FC14; Wed, 1 Aug 2012 19:29:57 +0000 (UTC) Received: from c122-106-171-246.carlnfd1.nsw.optusnet.com.au (c122-106-171-246.carlnfd1.nsw.optusnet.com.au [122.106.171.246]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q71JTn61013963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Aug 2012 05:29:50 +1000 Date: Thu, 2 Aug 2012 05:29:49 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Giovanni Trematerra In-Reply-To: Message-ID: <20120802051805.P3345@besplex.bde.org> References: <201207310548.q6V5mZHf091624@svn.freebsd.org> <50179581.9070805@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Konstantin Belousov , davidxu@FreeBSD.org, svn-src-head@FreeBSD.org, bde@FreeBSD.org Subject: Re: svn commit: r238936 - in head/sys: fs/fifofs kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 01 Aug 2012 19:29:58 -0000 On Wed, 1 Aug 2012, Giovanni Trematerra wrote: > On Tue, Jul 31, 2012 at 10:21 AM, David Xu wrote: >> ... >> The old code broke some history semantic of FIFO pipe, you can try the test >> tool /usr/src/tools/regression/poll/pipepoll, try it before and after my >> commit, also compare the result with 8.3-STABLE, without this commit, >> both sub-tests 6c and 6d failed. > > This is on Vanilla 9.0-RELEASE where new fifo implementation weren't backported > > FreeBSD bombay 9.0-RELEASE FreeBSD 9.0-RELEASE #3: Tue Dec 27 21:59:00 > UTC 2011 root@build9x64.pcbsd.org:/usr/obj/builds/i386/pcbsd-build90/fbsd-source/9.0/sys/GENERIC > i386 > > [gianni@bombay] /usr/src/tools/regression/poll#./pipepoll > 1..20 > not ok 17 FIFO state 6a: expected POLLHUP; got POLLIN | POLLHUP > not ok 18 FIFO state 6b: poll result 0 expected 1. expected POLLHUP; got 0 > not ok 19 FIFO state 6c: expected POLLHUP; got POLLIN | POLLHUP > not ok 20 FIFO state 6d: expected POLLHUP; got POLLIN | POLLHUP > > As you can see, sub-tests 6c and 6d failed too on 9. So it's not a problem with > new code though is irrelevant wrt the commit. The failure is very differnt. Failure to clear POLLIN in 6a, 6c and 6d is a normal bug in FreeBSD. Failure to set POLLHUP is apparently a normal bug in FreeBSD (I didn't know about this one). But now, POLLHUP isn't set for 6c or 6d, and consequentially, POLLIN isn't set either. The behaviour is strangely version-depending: - FreeBSD-9 (ref9-amd64): as above (select 6c and 6d pass) - FreeBSD-10 (ref10-amd64 Feb 19 2012): as above - FreeBSD-10 (ref10-i386 Jul 10 2012): not ok 17 FIFO state 6a: expected POLLHUP; got POLLIN | POLLHUP not ok 18 FIFO state 6b: poll result 0 expected 1. expected POLLHUP; got 0 not ok 19 FIFO state 6c: poll result 0 expected 1. expected POLLHUP; got 0 not ok 20 FIFO state 6d: poll result 0 expected 1. expected POLLHUP; got 0 Actually, this is not strange. The difference between the FreeBSD-10's sys_pipe.c is your new pipe implementation. Bruce