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 execution of test suite breaks tests #371

Open
enter-github-username opened this issue Feb 19, 2023 · 0 comments
Open

Parallel execution of test suite breaks tests #371

enter-github-username opened this issue Feb 19, 2023 · 0 comments

Comments

@enter-github-username
Copy link

enter-github-username commented Feb 19, 2023

Automake allows the execution of tests in parallel by adding the -j parameter to make check. However, doing this breaks a large amount of tests (like e.g. tests/usrdef_ipaddr_dotdot.sh), as they use the same "tmp.rulebase" file and delete all other *.rulebase files after finishing, interfering with each other.

You should be able to reproduce this issue by running make check with the -j flag, e.g. make -j16 check. The log files of the affected tests will contain errors like:

liblognorm error: rulebase file tmp.rulebase[7]: invalid field type '"literal", "text"
liblognorm error: rulebase file tmp.rulebase[10]: invalid field type '"num", "type"'
liblognorm error: rulebase file tmp.rulebase[11]: invalid field type '@two-hex-bytes'
liblognorm error: rulebase file tmp.rulebase[1]: invalid field type '@IPaddr'

A possible solution may be to always specify a certain rulebase file per test, so e.g. not using add_rule etc. without the second parameter (which would cause it to default back to "tmp.rulebase"). Additionally, cleanup_tmp_files would have to be changed to e.g. reset_rules as well, to only delete a certain, given rulebase file.

@enter-github-username enter-github-username changed the title Parallel execution of tests suite breaks tests Parallel execution of test suite breaks tests Feb 19, 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

1 participant