diff options
author | MSP-Greg <MSP-Greg@users.noreply.github.com> | 2019-12-31 01:19:31 -0600 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2020-01-30 13:34:24 +0900 |
commit | 44ef8af4fb0a793f020147e3f077cd061953c8fa (patch) | |
tree | 1736876530e473b07ede15f450f230f843f587d9 /spec/ruby | |
parent | 6646c2b2ab7efd389075ad5f187b458c4bc138cc (diff) |
MinGW on Actions (#2791)
* MinGW - skip spec in spec/ruby/optional/capi/thread_spec.rb
C-API Thread function rb_thread_call_without_gvl
-- runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO
stops/freezes spec tests
See https://bugs.ruby-lang.org/issues/16265
* MinGW - skip test test/resolv/test_dns.rb
Test times out in CI (both AppVeyor & Actions), cannot repo locally
* MinGW - skip test test/ruby/test_thread_queue.rb
* Add Actions mingw.yml
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/optional/capi/thread_spec.rb | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/spec/ruby/optional/capi/thread_spec.rb b/spec/ruby/optional/capi/thread_spec.rb index 17fe373fda..df454d1ea8 100644 --- a/spec/ruby/optional/capi/thread_spec.rb +++ b/spec/ruby/optional/capi/thread_spec.rb @@ -121,23 +121,25 @@ describe "C-API Thread function" do thr.value.should be_true end - it "runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO" do - thr = Thread.new do - @t.rb_thread_call_without_gvl_with_ubf_io - end + guard -> { platform_is :mingw and ruby_version_is ""..."2.7" } do + it "runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO" do + thr = Thread.new do + @t.rb_thread_call_without_gvl_with_ubf_io + end - # Wait until it's blocking... - Thread.pass while thr.status and thr.status != "sleep" + # Wait until it's blocking... + Thread.pass while thr.status and thr.status != "sleep" - # The thread status is set to sleep by rb_thread_call_without_gvl(), - # but the thread might not be in the blocking read(2) yet, so wait a bit. - sleep 0.1 + # The thread status is set to sleep by rb_thread_call_without_gvl(), + # but the thread might not be in the blocking read(2) yet, so wait a bit. + sleep 0.1 - # Wake it up, causing the unblock function to be run. - thr.wakeup + # Wake it up, causing the unblock function to be run. + thr.wakeup - # Make sure it stopped and we got a proper value - thr.value.should be_true + # Make sure it stopped and we got a proper value + thr.value.should be_true + end end end end |