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 Lin tests for Base.Buffer #323

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

shym
Copy link
Collaborator

@shym shym commented Apr 6, 2023

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.

These tests are enabled only when base is installed to avoid adding
another global dependency
This still requires ensuring that the test can compile without Base
because dune does not support `enabled_if %{lib-available:base}` on
executables (and it doesn't disable compilation in `test` stanza)
@shym
Copy link
Collaborator Author

shym commented Apr 12, 2023

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
Copy link
Collaborator Author

shym commented Apr 12, 2023

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

@jmid
Copy link
Collaborator

jmid commented May 24, 2023

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.

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.

None yet

2 participants