emlix contributed to cmocka Q1 2025

  • Community, OS Contributions

The emlix team recently made contributions to the cmocka unit testing framework.

Recently, emlix was able to contribute to the cmocka unit testing framework (https://gitlab.com/cmocka) by returning an extension developed in the elos (https://github.com/Elektrobit/elos) project in cooperation with Elektrobit GmbH as a proposal to make mocking more reliable by naming the mock values. Before if a mocked function have to return many mocked values it was important to keep the order of defining the mocks and the expectations aligned. Now as mocks and expectations can be matched via names it is less error prone and more convenient to write complex mock-setups.

emlix was also able to contribute to the cmocka unit testing framework by returning an extension developed in the elos project in cooperation with Elektrobit GmbH as a proposal to mock `errno` values set by i.e. libc functions. Additionally we introduce a new set of functions like 

will_set_errno(),will_set_errno_count(),will_set_errno_always() 

and 

will_set_errno_maybe() 

to allow mocking of `errno`.