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

Add STM ws_deque tests from multicoretests repo #43

Merged
merged 6 commits into from
Jan 23, 2023

Conversation

jmid
Copy link
Contributor

@jmid jmid commented Dec 12, 2022

We now released qcheck-stm so here comes a PR with STM tests of Ws_deque from ocaml-multicore/multicoretests

STM tests are model-based and so describe the intended state of a Ws_deque by a list (type state).
A slight complication is the contract for pop and push which is only allowed by the deque owner.
We therefore use two generators - one for the generator and one for stealers.

From the model description we derive 3 tests:

  • a sequential test of push and pop
  • a parallel test with one owner and one stealer
  • a negative parallel test that breaks the contract and hence fails as expected

@lyrm
Copy link
Collaborator

lyrm commented Dec 14, 2022

Thanks for the PR ! I have a lot of multicoretests for the lock-free data structures ready and waiting to be added !

@jmid
Copy link
Contributor Author

jmid commented Jan 16, 2023

Hi @lyrm 👋
Sorry, I didn't notice this was complaining about missing dependencies!
8f0ceb6 adds a hand-written show-function, so ppx_deriving.show is no longer a requirement - but I forgot to remove the (preprocess (pps ppx_deriving.show)) line from the dune rule 🤦
(I don't believe the test from this PR needs ppx_deriving_qcheck)

@lyrm
Copy link
Collaborator

lyrm commented Jan 17, 2023

Oh, thanks and sorry, I should definitely have seen that !

Note that my initial purpose was just to remove conflicts with the main branch to merge :) Hopefully, it will have done it right this time !

@lyrm lyrm merged commit 6f0e3a9 into ocaml-multicore:main Jan 23, 2023
@jmid jmid deleted the add-stm-wsdeque-tests branch January 23, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants