Skip to content

Parallel execution of test suite breaks tests #371

@enter-github-username

Description

@enter-github-username

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions