From 44ef8af4fb0a793f020147e3f077cd061953c8fa Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Tue, 31 Dec 2019 01:19:31 -0600 Subject: 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 --- spec/ruby/optional/capi/thread_spec.rb | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'spec') 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 -- cgit v1.2.3