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

ruby-changes:58251

From: Kazuhiro <ko1@a...>
Date: Tue, 15 Oct 2019 18:54:41 +0900 (JST)
Subject: [ruby-changes:58251] b7079e5384 (master): Try to avoid random failure

https://git.ruby-lang.org/ruby.git/commit/?id=b7079e5384

From b7079e538437aacf079d82c21504e44d7396926a Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Tue, 15 Oct 2019 18:50:46 +0900
Subject: Try to avoid random failure

https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20191015T070011Z.fail.html.gz
```
  1) Failure:
TestProcess#test_kill_at_spawn_failure [/home/chkbuild/chkbuild/tmp/build/20191015T070011Z/ruby/test/ruby/test_process.rb:2276]:
[ruby-core:69304] [Bug #11166].
<#<Thread:0x000009f60a7cac40@/home/chkbuild/chkbuild/tmp/build/20191015T070011Z/ruby/test/ruby/test_process.rb:2272 dead>> expected but was
<nil>.
``

diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index d1814a8..72120e4 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -2269,7 +2269,9 @@ EOS https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L2269
     th = nil
     x = with_tmpchdir {|d|
       prog = "#{d}/notexist"
-      th = Thread.start {system(prog);sleep}
+      q = Thread::Queue.new
+      th = Thread.start {system(prog);q.push(nil);sleep}
+      q.pop
       th.kill
       th.join(0.1)
     }
-- 
cgit v0.10.2


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

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