From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-2.1 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.kgio.general Subject: Re: Current test failures on OpenBSD Date: Tue, 15 Nov 2011 13:01:33 -0800 Message-ID: <20111115210133.GA27689@dcvr.yhbt.net> References: <20111115004249.GR10168@jeremyevans.local> <20111115004249.GR10168@jeremyevans.local> <20111115032629.GB3666@dcvr.yhbt.net> <20111115155224.GW10168@jeremyevans.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1321390915 6447 80.91.229.12 (15 Nov 2011 21:01:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Nov 2011 21:01:55 +0000 (UTC) To: kgio@librelist.org Original-X-From: kgio@librelist.org Tue Nov 15 22:01:48 2011 Return-path: Envelope-to: gclrkg-kgio@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: kgio@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.kgio.general:66 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RQQ8X-0003dt-6Z for gclrkg-kgio@m.gmane.org; Tue, 15 Nov 2011 22:01:45 +0100 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id 3D20A21CB88 for ; Tue, 15 Nov 2011 21:05:00 +0000 (UTC) Jeremy Evans wrote: > Should the 5 accept tests that fail on 1.8.7 just be skipped? Yes, on all systems. I now recall sockets created from accept() will inherit the O_NONBLOCK flag on some (or all?) *BSDs from the listen socket. And the listen socket calling accept() _must_always_ have the O_NONBLOCK flag set when using green threads. O_NONBLOCK with Ruby is really an implementation detail and mostly irrelevant for non-listen sockets. All the *_nonblock methods in Ruby and the kgio_try* methods always ensure O_NONBLOCK is set to avoid blocking. When emulating blocking, Ruby/kgio will just select() if it hits EAGAIN if O_NONBLOCK happens to be set (with either green or native threads) > It looks like the tryaccept flag isn't supported on OpenBSD, or at least > that it doesn't set the returned socket to nonblocking. Should those tests > be skipped on OpenBSD, or could there a bug in the code? Buggy tests in general :x I'll fix the tests and documentation in a few.