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
@ -84,12 +84,12 @@ class TestIO < Test::Unit::TestCase
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def trapping_usr1
|
def trapping_usr2
|
||||||
@usr1_rcvd = 0
|
@usr1_rcvd = 0
|
||||||
trap(:USR1) { @usr1_rcvd += 1 }
|
trap(:USR2) { @usr1_rcvd += 1 }
|
||||||
yield
|
yield
|
||||||
ensure
|
ensure
|
||||||
trap(:USR1, "DEFAULT")
|
trap(:USR2, "DEFAULT")
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_pipe
|
def test_pipe
|
||||||
@ -865,13 +865,13 @@ class TestIO < Test::Unit::TestCase
|
|||||||
rescue Errno::EBADF
|
rescue Errno::EBADF
|
||||||
skip "nonblocking IO for pipe is not implemented"
|
skip "nonblocking IO for pipe is not implemented"
|
||||||
end
|
end
|
||||||
trapping_usr1 do
|
trapping_usr2 do
|
||||||
nr = 30
|
nr = 30
|
||||||
begin
|
begin
|
||||||
pid = fork do
|
pid = fork do
|
||||||
s1.close
|
s1.close
|
||||||
IO.select([s2])
|
IO.select([s2])
|
||||||
Process.kill(:USR1, Process.ppid)
|
Process.kill(:USR2, Process.ppid)
|
||||||
buf = String.new(capacity: 16384)
|
buf = String.new(capacity: 16384)
|
||||||
nil while s2.read(16384, buf)
|
nil while s2.read(16384, buf)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user