Skip to content

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 !

@lyrm lyrm force-pushed the add-stm-wsdeque-tests branch from 5357dca to 45d54b9 Compare January 16, 2023 14:51
@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 force-pushed the add-stm-wsdeque-tests branch from 0ceb095 to 60b9bc0 Compare January 17, 2023 09:25
@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