Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 70509 invoked from network); 15 Mar 2006 21:14:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Mar 2006 21:14:23 -0000 Received: (qmail 57648 invoked by uid 500); 15 Mar 2006 21:14:22 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 57359 invoked by uid 500); 15 Mar 2006 21:14:20 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 57348 invoked by uid 99); 15 Mar 2006 21:14:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 13:14:20 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rooneg@gmail.com designates 64.233.182.193 as permitted sender) Received: from [64.233.182.193] (HELO nproxy.gmail.com) (64.233.182.193) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 13:14:19 -0800 Received: by nproxy.gmail.com with SMTP id l37so148584nfc for ; Wed, 15 Mar 2006 13:13:58 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MFyE6Ilyvzlb1duAh53Dvkiq3OVB2tgWP31dEwu3oy/zn/7RGo4dMF26ys6YlbdfYO1fHEkZVjllMR2ED77bebHfjfA/HeFnPB/W4qiaIDV0FIrK1bLtrEpw/43lNhCg+YDq6CG+uQC5vps+JV2DPvYhg/e9cI6IChsa6gdb1fc= Received: by 10.48.248.20 with SMTP id v20mr480362nfh; Wed, 15 Mar 2006 13:13:58 -0800 (PST) Received: by 10.49.64.16 with HTTP; Wed, 15 Mar 2006 13:13:58 -0800 (PST) Message-ID: <7edfeeef0603151313m492639c8of53a0ce471dd84b6@mail.gmail.com> Date: Wed, 15 Mar 2006 13:13:58 -0800 From: "Garrett Rooney" Sender: rooneg@gmail.com To: "APR Development List" Subject: Re: testpoll.c:multi_event_pollset and 1.2.x In-Reply-To: <7edfeeef0603151036u1c9c359eideacdd4a108e4b5d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <7edfeeef0603141319t7372632ai63eabff105476fa3@mail.gmail.com> <20060315120905.GC17779@redhat.com> <7edfeeef0603151036u1c9c359eideacdd4a108e4b5d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 3/15/06, Garrett Rooney wrote: > On 3/15/06, Joe Orton wrote: > > > Returning two separate descriptors should be valid behaviour, the test > > just needs to be adjusted to handle that case; it'll still catch the bu= g > > in the select() backend. Can you try this patch? > > Tried on FreeBSD: > > > Index: testpoll.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- testpoll.c (revision 385518) > > +++ testpoll.c (working copy) > > @@ -309,10 +309,25 @@ > > > > rv =3D apr_pollset_poll(pollset, 0, &lrv, &descs); > > ABTS_INT_EQUAL(tc, 0, APR_STATUS_IS_TIMEUP(rv)); > > - ABTS_INT_EQUAL(tc, 1, lrv); > > - ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s); > > - ABTS_INT_EQUAL(tc, APR_POLLIN | APR_POLLOUT, descs[0].rtnevents); > > - ABTS_PTR_EQUAL(tc, s[0], descs[0].client_data); > > + if (lrv =3D=3D 1) { > > + ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s); > > + ABTS_INT_EQUAL(tc, APR_POLLIN | APR_POLLOUT, descs[0].rtnevent= s); > > + ABTS_PTR_EQUAL(tc, s[0], descs[0].client_data); > > + } > > + else if (lrv =3D=3D 2) { > > + ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s); > > + ABTS_PTR_EQUAL(tc, s[0], descs[0].client_data); > > + ABTS_PTR_EQUAL(tc, s[0], descs[1].desc.s); > > + ABTS_PTR_EQUAL(tc, s[0], descs[1].client_data); > > + ABTS_ASSERT(tc, "returned events incorrect", > > + ((descs[0].rtnevents | descs[1].rtnevents) > > + =3D=3D (APR_POLLIN | APR_POLLOUT)) > > + && descs[0].rtnevents !=3D descs[1].rtnevents); > > This fails because both rtnevents are actually APR_POLLIN | APR_POLLOUT. > > > + } > > + else { > > + ABTS_ASSERT(tc, "either one or two events returned", > > + lrv =3D=3D 1 || lrv =3D=3D 2); > > + } > > > > recv_msg(s, 0, p, tc); > > > > If we get past that point, we later fail because at the line: > > ABTS_INT_EQUAL(tc, APR_POLLOUT, descs[0].rtnevents); > > The rtnevents is again APR_POLLIN | APR_POLLOUT. Not clear why that's > the case, but there we have it... Figured it out. See r386154 for the fix. Long standing bug in the kqueue code. Will backport to 1.2.x real soon now. -garrett