summaryrefslogtreecommitdiff
path: root/spec/ruby/optional
diff options
context:
space:
mode:
authorMSP-Greg <MSP-Greg@users.noreply.github.com>2019-12-31 01:19:31 -0600
committerTakashi Kokubun <takashikkbn@gmail.com>2019-12-30 23:19:31 -0800
commiteb2b4258214337f165eb994e2c5b9c2a3f6ae0a8 (patch)
treeb0ddd5b4045ce415aba441d97a63b202e59ef406 /spec/ruby/optional
parent79c420267672dbfde257d77eb9d94c996920f368 (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/optional')
-rw-r--r--spec/ruby/optional/capi/thread_spec.rb28
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