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

Tests fail on OCaml 5.00 #120

Closed
kit-ty-kate opened this issue Feb 8, 2022 · 3 comments
Closed

Tests fail on OCaml 5.00 #120

kit-ty-kate opened this issue Feb 8, 2022 · 3 comments

Comments

@kit-ty-kate
Copy link
Contributor

#=== ERROR while compiling ocamlgraph.2.0.0 ===================================#
# context              2.2.0~alpha~dev | linux/x86_64 | ocaml-variants.5.00.0+trunk | file:///home/opam/opam-repository
# path                 ~/.opam/5.00/.opam-switch/build/ocamlgraph.2.0.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ocamlgraph -j 47 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/ocamlgraph-2162-7fb849.env
# output-file          ~/.opam/log/ocamlgraph-2162-7fb849.out
### output ###
# test_wto: all tests succeeded.
# File "tests/test_components.expected", line 1, characters 0-0:
# strat: all tests succeeded.
# test_fixpoint: all tests succeeded.
# basic: all tests succeeded.
# dot: all tests succeeded.
# test_bf: all tests succeeded.
# test_johnson: all tests succeeded.
# test_chaotic: all tests succeeded.
# test_topsort alias tests/runtest
# test topsort: all tests succeeded.
#        check alias tests/runtest
# check: all tests succeeded
#          git (internal) (exit 1)
# (cd _build/default && /usr/bin/git --no-pager diff --no-index --color=always -u tests/test_components.expected tests/test_components.output)
# diff --git a/tests/test_components.expected b/tests/test_components.output
# index fe0501b..84d3bd2 100644
# --- a/tests/test_components.expected
# +++ b/tests/test_components.output
# @@ -1,11 +1,11 @@
#  7 components
#  0 -> 0
#  1 -> 1
# -2 -> 1
# -3 -> 2
# -4 -> 3
# -5 -> 3
# -6 -> 4
# -7 -> 5
# -8 -> 6
# -9 -> 0
# +2 -> 2
# +3 -> 3
# +4 -> 2
# +5 -> 0
# +6 -> 1
# +7 -> 4
# +8 -> 5
# +9 -> 6
@backtracking
Copy link
Owner

Thanks @kit-ty-kate for reporting this!
Clearly the OCaml random generator is not initialized the same way in 5.00.
But this is really weird that we are making use of random like this in a regression test 😬
I'm fixing that with a Random.init for now.

@kit-ty-kate
Copy link
Contributor Author

cc @Octachron did something changed in trunk there? I couldn’t find anything in the changelog at a glance

@Octachron
Copy link

The PRNG itself has been changed in 5.0 (ocaml/ocaml#10742) to a splittable PRNG in order to have by-domain PRNG with good statistical properties. I fear that this means that 4.14 Random and 5.0 Random will yield different results.

adatario added a commit to adatario/guix-tarides that referenced this issue Apr 25, 2023
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

No branches or pull requests

3 participants