kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: kgio@librelist.org
Subject: Re: Test failure caused by commit 377028d99
Date: Wed, 25 Sep 2013 17:46:36 +0000	[thread overview]
Message-ID: <20130925174636.GA11878@dcvr.yhbt.net> (raw)
In-Reply-To: CAAB-KcnpvcG6=OZNsBmvv440OHfCWs6-eDD7L6oD=ziCRXPHLA@mail.gmail.com

Hleb Valoshka <375gnu@gmail.com> wrote:
> On 9/21/13, Eric Wong <normalperson@yhbt.net> wrote:
> 
> > Does the following help?
> 
> No. I was using ruby 2.1.0dev (2013-09-22 trunk 43011) [x86_64-linux].
> 
> 20 runs, 2 signals still were delivered too late, 1 test failure:

Thanks for the report.  I'm not sure what can be done :< git will
remember for us in case we want to resurrect a fixed version of it.
I'll push this out:

Subject: [PATCH] test_poll: remove race prone test_poll_EINTR_changed test

We haven't figured out a way to reliably test this w/o races, so lets
just remove it for now and trust it works by reading the C code.

ref: <CAAB-KcnpvcG6=OZNsBmvv440OHfCWs6-eDD7L6oD=ziCRXPHLA@mail.gmail.com>
---
 test/test_poll.rb | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/test/test_poll.rb b/test/test_poll.rb
index d9a2b07..6463ef9 100644
--- a/test/test_poll.rb
+++ b/test/test_poll.rb
@@ -87,31 +87,6 @@ class TestPoll < Test::Unit::TestCase
       trap(:USR1, orig)
   end
 
-  def test_poll_EINTR_changed
-    ok = false
-    pollset = { @rd => Kgio::POLLIN }
-    orig = trap(:USR1) do
-      pollset[@wr] = Kgio::POLLOUT
-      ok = true
-    end
-    thr = Thread.new do
-      sleep 0.100
-      100.times do
-        Process.kill(:USR1, $$)
-        Thread.pass
-      end
-    end
-    t0 = Time.now
-    res = Kgio.poll(pollset, 1000)
-    diff = Time.now - t0
-    thr.join
-    assert_equal({@wr => Kgio::POLLOUT}, res)
-    assert diff < 1.0, "diff=#{diff}"
-    assert ok
-    ensure
-      trap(:USR1, orig)
-  end
-
   def test_poll_signal_torture
     usr1 = 0
     empty = 0
-- 
1.8.4


      reply	other threads:[~2013-09-25 17:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 20:14 Test failure caused by commit 377028d99 Hleb Valoshka
2013-09-04 20:51 ` Eric Wong
2013-09-05  7:55   ` Hleb Valoshka
2013-09-05 19:48   ` Hleb Valoshka
2013-09-05 23:13     ` Eric Wong
2013-09-15 19:07       ` Hleb Valoshka
2013-09-21  9:30         ` Eric Wong
2013-09-24 15:02           ` Hleb Valoshka
2013-09-25 17:46             ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/kgio/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130925174636.GA11878@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=kgio@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/kgio.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).