Skip to content

Testing Framework for Resource Tracking #543

@elfenpiff

Description

@elfenpiff

Brief feature description

The issue #542 showed that we - despite a good test coverage and a abstraction - we still have resource leaks. Therefore, we require a testing platform/framework similar to the Windows, MacOS platform files in iceoryx utils.

It should be realized in the following way:

  • Nowhere in the code (posix wrappers) we use posix calls or other resource handling calls directly (like malloc, free ...)
  • In this platform we provide all used posix calls with an iox_ prefix. Like it is already done with the semaphore where we use only iox_sem_open in the code.
  • The platform will forward all arguments to the actual posix implementation but will additionally track the required resources. For instance when iox_sem_open("mySemaphore") is called it will track that there exist a mySemaphore in the system and when iox_sem_close(mySemaphoreHandle) is called it will release it.
  • In all test targets (module-, integration- and componenttests), restricted purely to linux, we only use the newly created iceoryx_utils/platform/testing platform. When we never call the posix calls directly and forward the arguments to the actual posix calls we have gained unit tests:
    • which behave exactly the way like the production code, since the actual posix calls are called
    • we can trace resource leaks
    • we can trace accessing invalid resources
    • we can verify arguments and that all the posix calls are accessed correctly (therefore we could store the provided arguments somewhere and make them accessible).

@dkroenke @elBoberido what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew featurefeature requestFeature request under evaluationtestA module/integration/stress/etc test for a componenttoolingAll iceoryx related tooling (scripts etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions