ruby-changes:41973
From: odaira <ko1@a...>
Date: Wed, 9 Mar 2016 09:28:47 +0900 (JST)
Subject: [ruby-changes:41973] odaira:r54047 (trunk): * test/io/wait/test_io_wait.rb (test_wait_readwrite_timeout):
odaira 2016-03-09 09:28:41 +0900 (Wed, 09 Mar 2016) New Revision: 54047 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54047 Log: * test/io/wait/test_io_wait.rb (test_wait_readwrite_timeout): select(2) in AIX returns "readable" for the write-side fd of a pipe, so it is not possible to use a pipe to test the read-write timeout of IO#wait on AIX. Modified files: trunk/ChangeLog trunk/test/io/wait/test_io_wait.rb Index: test/io/wait/test_io_wait.rb =================================================================== --- test/io/wait/test_io_wait.rb (revision 54046) +++ test/io/wait/test_io_wait.rb (revision 54047) @@ -141,7 +141,14 @@ class TestIOWait < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/io/wait/test_io_wait.rb#L141 def test_wait_readwrite_timeout assert_equal @w, @w.wait(0.01, :read_write) written = fill_pipe - assert_nil @w.wait(0.01, :read_write) + if /aix/ =~ RUBY_PLATFORM + # IO#wait internally uses select(2) on AIX. + # AIX's select(2) returns "readable" for the write-side fd + # of a pipe, so @w.wait(0.01, :read_write) does not return nil. + assert_equal @w, @w.wait(0.01, :read_write) + else + assert_nil @w.wait(0.01, :read_write) + end @r.read(written) assert_equal @w, @w.wait(0.01, :read_write) end Index: ChangeLog =================================================================== --- ChangeLog (revision 54046) +++ ChangeLog (revision 54047) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Mar 9 09:19:55 2016 Rei Odaira <Rei.Odaira@g...> + + * test/io/wait/test_io_wait.rb (test_wait_readwrite_timeout): + select(2) in AIX returns "readable" for the write-side fd + of a pipe, so it is not possible to use a pipe to test + the read-write timeout of IO#wait on AIX. + Wed Mar 9 03:35:22 2016 Charles Oliver Nutter <headius@h...> * test/ruby/test_require.rb (test_require_with_loaded_features_pop): -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/