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

Parallel test execution causes some tests to fail #13

Open
enter-github-username opened this issue Mar 5, 2023 · 0 comments
Open

Parallel test execution causes some tests to fail #13

enter-github-username opened this issue Mar 5, 2023 · 0 comments

Comments

@enter-github-username
Copy link

enter-github-username commented Mar 5, 2023

Some tests are flaky if they are executed in parallel, i.e. one or more of them may suddenly fail. The affected tests are test/t-chain, test/t-chaindb and test/t-wallet. This issue may be reproduced by executing the test suite in parallel with the -j parameter to set the number of processes the test suite should use, e.g. make -j32 check

As far as I could debug the issue, this is solely caused by btc_rimraf(), which is called in all three tests with the value of BTC_PREFIX (set to './tmp' in tests.h). The method attempts to delete the folder with the given name ('./tmp', which all three tests use) and, if it is not empty, all files and folders inside it. As the first of the affected tests finishes, it deletes the files the other tests still use, causing them to fail.

The issue be fixable by simply defining a different folder name for BTC_PREFIX in the each test (e.g. directly in the respective *.c-file), instead of defining it in tests.h.

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

2 participants
@enter-github-username and others