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

Fail to open file when multiple instance of a test run in parallel #281

Open
picojulien opened this issue Oct 6, 2020 · 1 comment
Open

Comments

@picojulien
Copy link

picojulien commented Oct 6, 2020

context

I have a non-deterministic test failure that I try to trigger by launching multiple instances of the same test in parallel.

bug

It used work well, but it now fails with

test_p2p_socket.exe: internal error, uncaught exception:
                     Unix.Unix_error(Unix.ENOENT, "open", "/home/julien/tezos/_build/_tests/tezos-p2p/p2p-connection..000.output")
                     Raised by primitive operation at file "src/alcotest/alcotest.ml", line 86, characters 24-74
                     Called from file "src/alcotest-engine/core.ml", line 292, characters 4-13
                     Called from file "src/alcotest-engine/monad.ml", line 68, characters 12-20
                     Called from file "src/alcotest-engine/core.ml", line 319, characters 4-103
                     Called from file "src/alcotest-engine/core.ml", line 465, characters 4-365
                     Called from file "src/alcotest-engine/cli.ml", line 117, characters 4-128
                     Called from file "cmdliner_term.ml", line 25, characters 19-24
                     Called from file "cmdliner.ml", line 117, characters 32-39

possible explanation

From what I'v seen, it's might be related to the fact that in core.ml the function redirect_test_output uses output_file with ~via_simlink:true.

Maybe the test tries to open the result file "p2p-connection..000.output" using the simlink "tezos-p2p", but an other test is concurrently moving the simlink to a new directory.

@picojulien
Copy link
Author

Very dirty hack on https://github.com/picojulien/alcotest/commits/master fixed my problem.

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

1 participant