From: Eric Wong <normalperson@yhbt.net>
To: sleepy.penguin@librelist.org
Subject: [sleepy.penguin] [PATCH 1/3] test_epoll_gc: force GC on EMFILE/ENFILE
Date: Fri, 12 Apr 2013 22:26:14 +0000 [thread overview]
Message-ID: <1365805576-1643-1-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: <1365805576-1643-1-git-send-email-normalperson@yhbt.net>
This helps avoid test errors on Rubinius where rb_gc() is a noop.
Otherwise, we might as well infinite loop on thread-creation to
trigger GC.
---
test/test_epoll_gc.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/test_epoll_gc.rb b/test/test_epoll_gc.rb
index b0a1868..ed2df05 100644
--- a/test/test_epoll_gc.rb
+++ b/test/test_epoll_gc.rb
@@ -42,6 +42,8 @@ def test_gc_safety
2048.times { IO.pipe; File.open(__FILE__)}
done = true
end
+ rescue Errno::EMFILE, Errno::ENFILE
+ Thread.new { GC.start }.join
end while true
end
end if ENV["GC_STRESS"].to_i != 0
--
1.8.2.1.366.ge2af9e3
next parent reply other threads:[~2013-04-12 22:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 22:26 Eric Wong [this message]
2013-04-12 22:26 ` [sleepy.penguin] [PATCH 2/3] .gitignore: add .rbx Eric Wong
2013-04-12 22:26 ` [sleepy.penguin] [PATCH 3/3] license + gem packaging cleanups Eric Wong
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/sleepy_penguin/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365805576-1643-1-git-send-email-normalperson@yhbt.net \
--to=normalperson@yhbt.net \
--cc=sleepy.penguin@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/sleepy_penguin.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).