posix_mq RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: ruby.posix.mq@librelist.com
Subject: Re: [PATCH 3/3] Add a sleep in alarm test in current Ruby.
Date: Wed, 4 Jul 2012 00:20:17 +0000	[thread overview]
Message-ID: <20120704002017.GA14457@dcvr.yhbt.net> (raw)
In-Reply-To: 1341346430-8113-3-git-send-email-375GNU@Gmail.COM

Hleb Valoshka <375gnu@gmail.com> wrote:
> Without that sleep alarms will be 0. Looks like Ruby VM issue.

Thanks, your other two patches look good and I've pushed them.

Can you elaborate on this issue?

I would like to see a bug report/analysis to Ruby upstream
(and or EGLIBC) maintainers.
I assume this only happens on GNU/kFreeBSD?

> --- a/test/test_posix_mq.rb
> +++ b/test/test_posix_mq.rb
> @@ -127,6 +127,7 @@ class Test_POSIX_MQ < Test::Unit::TestCase
>      a = nil
>      assert_raises(Errno::EINTR) { a = @mq.receive }
>      elapsed = Time.now - t0
> +    sleep 0.01 if RUBY_VERSION >= '1.9'
>      assert_nil a
>      assert elapsed >= interval, elapsed.inspect
>      assert elapsed < 1.10, elapsed.inspect

Fwiw, I'm not sure if this is a good test, either.  Since I
wrote this code, I've come to believe normal API methods should
not raise Errno::EINTR.  I've changed a few of my other libraries
(sleepy_penguin, kgio) to avoid EINTR but missed this one.


  reply	other threads:[~2012-07-04  0:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03 20:13 [PATCH 1/3] Fix call to DL::Function.new in tests Hleb Valoshka
2012-07-03 20:13 ` [PATCH 2/3] Add libc names for Debian GNU/kFreeBSD and FreeBSD " Hleb Valoshka
2012-07-03 20:13 ` [PATCH 3/3] Add a sleep in alarm test in current Ruby Hleb Valoshka
2012-07-04  0:20   ` Eric Wong [this message]
2012-07-04  0:59     ` Eric Wong
2012-07-04 13:39     ` Hleb Valoshka
2012-07-12  8:03       ` Hleb Valoshka
2012-07-12  8:09         ` Eric Wong
2012-07-12 13:46           ` Hleb Valoshka
2012-07-12 19:46             ` Eric Wong
2012-07-13  7:21       ` Eric Wong
2012-07-13 16:46         ` Hleb Valoshka

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/ruby_posix_mq/

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

  git send-email \
    --in-reply-to=20120704002017.GA14457@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=ruby.posix.mq@librelist.com \
    /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/ruby_posix_mq.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).