ElektraInitiative / libelektra

Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
https://www.libelektra.org
BSD 3-Clause "New" or "Revised" License
208 stars 123 forks source link

parallelize tests/kdb #2024

Closed ingwinlu closed 5 years ago

ingwinlu commented 6 years ago

The tests in tests/kdb are some of the longest running tests in the repository. They currently have to be run serial as they all modify the key database.

Can we create a tmpdir for each of those tests with a new key database for each of the test suites? This would shave some time of the more expensive test runs.

markus2330 commented 6 years ago

Thank you for reporting the problem!

Can we create a tmpdir for each of those tests with a new key database for each of the test suites?

Tests write into the system and spec namespaces, which are paths fixed at compile-time. So it would only be possible:

  1. if we recompile Elektra for every test (or parts of tests).
  2. fix the race tests #137 and the semlock plugin #1399 which would completely serialize all KDB accesses to avoid any conflict. Then parallel access would not matter, except if the very same key is overwritten which should not happen because we use /tests/testname as prefixes.