[前][次][番号順一覧][スレッド一覧]

ruby-changes:27045

From: kosaki <ko1@a...>
Date: Wed, 6 Feb 2013 15:37:30 +0900 (JST)
Subject: [ruby-changes:27045] kosaki:r39097 (trunk): * test/ruby/test_process.rb (test_setsid): skip when platform is

kosaki	2013-02-06 15:37:18 +0900 (Wed, 06 Feb 2013)

  New Revision: 39097

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39097

  Log:
    * test/ruby/test_process.rb (test_setsid): skip when platform is
      OpenBSD. Contributed from George Koehler.
      [Bug #7789] [ruby-core:51889]

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_process.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39096)
+++ ChangeLog	(revision 39097)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Feb  4 02:18:00 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* test/ruby/test_process.rb (test_setsid): skip when platform is
+	  OpenBSD. Contributed from George Koehler.
+	  [Bug #7789] [ruby-core:51889]
+
 Wed Feb  6 13:35:20 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* proc.c (rb_method_entry_location, rb_{mod,obj}_method_location): new
Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 39096)
+++ test/ruby/test_process.rb	(revision 39097)
@@ -1574,6 +1574,9 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1574
   def test_setsid
     return unless Process.respond_to?(:setsid)
     return unless Process.respond_to?(:getsid)
+    # OpenBSD doesn't allow Process::getsid(pid) when pid is in
+    # different session.
+    return if /openbsd/ =~ RUBY_PLATFORM
 
     IO.popen([RUBY, "-e", <<EOS]) do|io|
 	Marshal.dump(Process.getsid, STDOUT)
@@ -1585,9 +1588,13 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1588
 
       # test Process.getsid() w/o arg
       assert_equal(Marshal.load(io), Process.getsid)
+
       # test Process.setsid return value and Process::getsid(pid)
       assert_equal(Marshal.load(io), Process.getsid(io.pid))
       Process.kill(:KILL, io.pid)
     end
   end
+
+
+
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]