Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test passing control between two threads in the ConditionVariable spec #5866

Merged
merged 1 commit into from Oct 27, 2019

Conversation

@asppsa
Copy link
Contributor

asppsa commented Sep 10, 2019

This tests (J)Ruby's ability to safely switch back and forth between two threads that both have locks on a single mutex, as identified in #5863.

I'm happy to make changes to this spec if needed. In particular, I wasn't sure what a suitable timeout should be (went with 5 seconds), and also whether to add this to the spec for #signal or #wait. I went with #signal because it seems that the failure is in the ability to wake up after going to sleep.

@asppsa

This comment has been minimized.

Copy link
Contributor Author

asppsa commented Sep 10, 2019

Also, I should note that I used MRI 2.6 to check that this spec can pass.

@kares kares added the tests label Sep 10, 2019
@kares kares added this to the JRuby 9.2.9.0 milestone Sep 10, 2019
@asppsa

This comment has been minimized.

Copy link
Contributor Author

asppsa commented Oct 26, 2019

@headius, I'll rebase this onto master to see if it passes now.

This tests (J)Ruby's ability to safely switch back and forth between two
threads that both have locks on a single mutex, as identified in #5863.
@asppsa asppsa force-pushed the asppsa:spec-5863 branch from 6126629 to 2979837 Oct 26, 2019
@headius

This comment has been minimized.

Copy link
Member

headius commented Oct 27, 2019

Excellent, thank you! Assuming this goes green I'll merge it in.

@headius

This comment has been minimized.

Copy link
Member

headius commented Oct 27, 2019

Two suites failed despite my best efforts, but I'm convinced they're just caching problems with the jnr-constants maven artifact. Merging this in...thank you for your thoroughness @asppsa!

@headius headius merged commit 1669333 into jruby:master Oct 27, 2019
4 of 5 checks passed
4 of 5 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
jruby.jruby Build #20191026.8 succeeded
Details
jruby.jruby (Job linux) Job linux succeeded
Details
jruby.jruby (Job mac) Job mac succeeded
Details
jruby.jruby (Job windows) Job windows succeeded
Details
@eregon

This comment has been minimized.

Copy link
Member

eregon commented Nov 30, 2019

@asppsa Thanks for this good spec, it also caught a bug in TruffleRuby!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.