Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purpose of mtCOVERAGE_TEST_MARKER macro in FreeRTOS

can anyone tell me what it the exact purpose of mtCOVERAGE_TEST_MARKER() macro in FreeRTOS sources? By default it expands to nothing.

It is obviously used for some coverage test, but I can't really think of a code that can be universally useful in all places where this macro is used.

like image 859
Jędrzej Dudkiewicz Avatar asked Oct 14 '14 07:10

Jędrzej Dudkiewicz


1 Answers

They provide thorough code coverage analysis - so each time there is an if() without an else we can see in a more automated way if the code has taken the path where the if() evaluates to true and where the if() evaluates to false - rather than just one path. The coverage tests are not published, but the general coding standard is found here: http://www.freertos.org/FreeRTOS-Coding-Standard-and-Style-Guide.html

like image 139
Richard Avatar answered Oct 15 '22 17:10

Richard