multicoretests icon indicating copy to clipboard operation
multicoretests copied to clipboard

Add Lin tests for Base.Buffer

Open shym opened this issue 2 years ago • 3 comments

Add Lin tests for Base.Buffer. This is split into two commits to keep track of the functions that can raise exceptions when used in parallel (while they shouldn’t in a sequential use).

Segfaults happened on 5.0.0 in CI, for instance there:

random seed: 255066454
generated error fail pass / total     time test name

[ ]    0    0    0    0 / 1000     0.0s Lin DSL Base Buffer test with Domain
/home/runner/work/_temp/cfbbcd46-3b2b-4f6b-b063-35a9068fc155.sh: line 2: 3690717 Segmentation fault      (core dumped) opam exec -- dune exec "$ONLY_TEST" -- -v
[ ]    0    0    0    0 / 1000     0.0s Lin DSL Base Buffer test with Domain (generating)

This is hopefully another symptom of ocaml/ocaml#12103 which was fixed on trunk by ocaml/ocaml#12104.

shym avatar Apr 06 '23 10:04 shym

For some reason, enabled_if seemed to work locally but is not enough to tell dune not to compile the test in CI, so I updated the PR with a workaround using a select ... from. It didn’t seem to work in a test stanza, though, so I unfolded it into an executable and a rule.

shym avatar Apr 12 '23 10:04 shym

(Runs on trunk will break, it was updated to 5.2, ppxlib must follow suite)

shym avatar Apr 12 '23 10:04 shym

I've given these tests a spin on 5.1 and trunk with this branch and cannot reproduce with a repeats count of 50: https://github.com/ocaml-multicore/multicoretests/tree/shym-base-buffer This indicates that the issue is indeed fixed by ocaml/ocaml#12104.

jmid avatar May 24 '23 09:05 jmid

Closing this for now, as we abandoned the idea of testing Base. Thanks for the PR and for confirming that this could be useful too! :smiley:

jmid avatar Dec 17 '24 09:12 jmid