mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
use SIGUSR2 to debug.
* test/ruby/test_io.rb: use SIGUSR2 instead of SIGUSR1 to confirm unknown SIGUSR1 exception. On parallel testing, sometime (1 per some days) SIGUSR1 exception. This fix will make clear which signal is a suspect. http://ci.rvm.jp/results/trunk-test@ruby-sky3/643893 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
80e8b524d3
commit
38895e5c10
1 changed files with 5 additions and 5 deletions
|
@ -84,12 +84,12 @@ class TestIO < Test::Unit::TestCase
|
|||
}
|
||||
end
|
||||
|
||||
def trapping_usr1
|
||||
def trapping_usr2
|
||||
@usr1_rcvd = 0
|
||||
trap(:USR1) { @usr1_rcvd += 1 }
|
||||
trap(:USR2) { @usr1_rcvd += 1 }
|
||||
yield
|
||||
ensure
|
||||
trap(:USR1, "DEFAULT")
|
||||
trap(:USR2, "DEFAULT")
|
||||
end
|
||||
|
||||
def test_pipe
|
||||
|
@ -865,13 +865,13 @@ class TestIO < Test::Unit::TestCase
|
|||
rescue Errno::EBADF
|
||||
skip "nonblocking IO for pipe is not implemented"
|
||||
end
|
||||
trapping_usr1 do
|
||||
trapping_usr2 do
|
||||
nr = 30
|
||||
begin
|
||||
pid = fork do
|
||||
s1.close
|
||||
IO.select([s2])
|
||||
Process.kill(:USR1, Process.ppid)
|
||||
Process.kill(:USR2, Process.ppid)
|
||||
buf = String.new(capacity: 16384)
|
||||
nil while s2.read(16384, buf)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue