This commit updates the CMock unit tests according to the changes introduced
to https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/982.
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
* Update unit test for vTaskEndScheduler change
* test_coverage_vTaskDelete_scheduler_not_running is removed due to vTaskDelete implementation change
---------
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
* Fix one typical misusage of CMock.
CMock has three policies when dealing with pointer:
1. compare_ptr : compare the pointer itself;
2. compare_data : compare the data which is pointed by pointer;
3. smart : compare the pointer itself, or compare the data;
By default, CMock use compare_data policy.
Most test cases in FreeRTOS need to compare the pointer itself,
and we haven't use CMock properly.
For example, one test case of vTaskResume is wrong, because current
CMock compares the data pointed by pointer, so the error didn't exposed.
There are so many misusage need to fix, it will take a lot of work.
I'm here to fix one typical misusage first.
* Try to fix formatting syntax.
* Add Cmock test case for updates in vTaskResume API introduced in Kernel PR#865.
* Update Kernel submodule pointer
---------
Co-authored-by: Rahul Kar <karahulx@amazon.com>
* Update unit test to cover idle task name longer than configMAX_TASK_NAME_LEN
* Update community supported demo submodule pointer
* Update kernel submodule pointer
* Update CBMC test
---------
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
* Use new version of CI-CD Actions, checkout@v3 instead of checkout@v2 on all jobs
* Use cSpell spell check, and use ubuntu-20.04 for formatting check
* Add in bot formatting action
* Update freertos_demo.yml and freertos_plus_demo.yml files to increase github log readability
* Add in a Qemu demo onto the workflows.
This PR fixes CBMC and unit test for single core FreeRTOS in the FreeRTOS-Kernel PR - https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/716.
- xYieldPendings and xIdleTaskHandles are now an array. Update in FreeRTOS unit test.
- Update CBMC patches.
Update the unit test for the following functions to verify that equal priority task won't be preempted
* vTaskResume
* xTaskResumeFromISR
* vTaskPrioritySet
* xTaskResumeAll
4 test cases are added to verify this scenario
* test_xTaskResumeAll_success_2_tasks_eq_prio_running_no_yield
* test_vTaskPrioritySet_success_eq_curr_prio_curr_tcb
* test_vTaskResume_success_eq_curr_prio_not_yield
* test_xTaskResumeFromISR_success_eq_curr_prio_suspended_task
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
* Add a unit test for tasks.c
This test simulates the scenario when a task with priority higher than
the currently executing task is unblocked as a result of the
xTaskIncrementTick call.
This is needed to fix the coverage drop in PR https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/568.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Add description for the test
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Add doc for another test
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
The test simulates the scenario when a task with priority equal to the
currently executing task is unblocked as a result of the
xTaskIncrementTick call.
Related PR - https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/568
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Test: add multi config ability to build system
* Remove Tests that are not implemented yet from the makefile
* Fix header check
* Test: Unit Test tasks.c
* UnitTest: tasks.c Save progress
* saving some work 70% coverage
* coverage 77%
* tasks.c coverage 90%
* tasks.c coverage 95%
* Cleanup and common header
* Cover some extra branches, no_mutex +stack growth
* Fix Makefile not to use modified version of c-preprocessor
* Remove c-preprocessor errros
* Rebase and add some tests
* Fortify_source=1 and O0 are mutually exclusive
* Style: Uncrustify code
* Style: Fix indent
* Fix Header checks
* Add prototypes
* Build: use unifdef instead of the c-preprocessor to generate different configurations
* Build: fix makefile cflags
* Fix UT after upgrading kernel version
* Resolve conflicts and test failures
* Comment fix version number
* Fix build error
* Update FreeRTOS/Test/CMock/Makefile
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>