sleepy_penguin RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: sleepy.penguin@librelist.org
Subject: [sleepy.penguin] [PATCH] test_epoll: switch test_dup_and_fork to exit!
Date: Sat, 19 Oct 2013 08:46:40 +0000	[thread overview]
Message-ID: <20131019084640.GA17040@dcvr.yhbt.net> (raw)
In-Reply-To: <20131019084640.GA17040@dcvr.yhbt.net>

exit! is preferable for forked processes in tests since
exit may fire at_exit handlers for tests depending on
which test suite or version of Ruby is loaded.

This was problematic in minitest 5.0.8 but not 4.3.2
---
 Note: we already use exit! in many places in tests

 test/test_epoll.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test_epoll.rb b/test/test_epoll.rb
index ed67988..88d0b6c 100644
--- a/test/test_epoll.rb
+++ b/test/test_epoll.rb
@@ -52,7 +52,7 @@ class TestEpoll < Testcase
     @ep.close
     assert ! epdup.closed?
     pid = fork do
-      exit(!epdup.closed? && @ep.closed?)
+      exit!(!epdup.closed? && @ep.closed?)
     end
     _, status = Process.waitpid2(pid)
     assert status.success?, status.inspect
-- 
1.8.4.483.g7fe67e6.dirty



           reply	other threads:[~2013-10-19  8:46 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20131019084640.GA17040@dcvr.yhbt.net>]

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=20131019084640.GA17040@dcvr.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).