Commit graph

20 commits

Author SHA1 Message Date
chinglee-iot
269b16a03a
Fix unit test for vTaskEndShceduler (#1163)
* 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>
2024-02-01 10:51:51 +08:00
Moral-Hao
fd352fd185 Fix misusage of CMock in dir tasks.
1. Change CMock policy of pointer from smart to compare_ptr;
2. Fix errors in test cases found by CMock.
2023-11-27 12:51:35 -08:00
Moral-Hao
ae39f8e245
Fix one typical misusage of CMock. (#1112)
* 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.
2023-11-13 15:44:59 -08:00
Moral-Hao
55d07daf0a
Add CMock test case for vTaskResume (#1111)
* 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>
2023-11-07 16:09:28 +05:30
chinglee-iot
e7d39763db
Add unit test for FreeRTOS SMP (#1047)
* Add unit test for FreeRTOS SMP to verify SMP scheduler logic in tasks.c which is enclosed by `configNUMBER_OF_CORES > 1`.

---------

Co-authored-by: Joshua Zarr <joshzarr@amazon.com>
Co-authored-by: Anubhav Rawal <rawalexe@amazon.com>
Co-authored-by: Alfred Gedeon <alfred2g@hotmail.com>
Co-authored-by: Adam Scislowicz <adamds@amazon.com>
Co-authored-by: jannusi <121577776+jannusi@users.noreply.github.com>
Co-authored-by: Krishna Vamsi Tallapaneni <124737189+vamsitas@users.noreply.github.com>
Co-authored-by: Kody Stribrny <kstribrn@amazon.com>
Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
2023-10-31 08:34:59 +08:00
chinglee-iot
1114e8f39b
Add kernel base priority get unit test (#1099)
* Add uxTaskBasePriorityGet and uxTaskBasePriorityGetFromISR unit test
2023-10-18 15:03:39 +08:00
Rahul Kar
03926888d8
Fix Unit test for APIs ulTaskNotifyTake and xTaskNotifyWait (#1102) 2023-10-17 09:54:06 +05:30
chinglee-iot
d3575643b8
Update for kernel idle task unit test (#1096)
* 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>
2023-10-12 12:53:52 +08:00
Soren Ptak
3a2f6646f0
Use CI-CD-Github-Actions for spelling and formatting, add in the bot formatting action, update the CI-CD workflow files. Fix incorrect spelling and formatting on files. (#1083)
* 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.
2023-09-06 12:35:37 -07:00
Gaurav-Aggarwal-AWS
38a57333ed
Fix unit test for Kernel PR #760 (#1075)
* Fix unit test for Kernel PR #760
* Update kernel submodule pointer
---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-08-18 11:42:14 -07:00
kar-rahul-aws
21f7947ab1
Make unit tests backward compatible (#1073)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-08-17 16:51:18 +05:30
chinglee-iot
7adb08eff5
Update single core CMBC and unit test (#1045)
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.
2023-07-24 15:42:20 +05:30
Gaurav-Aggarwal-AWS
2f5b186ea2
Add unit tests for kernel PR #679 (#1015)
Also, fix the broken tests by that PR.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-05-25 16:24:35 +05:30
Darian
e7d31258f6
Add unit tests for GetStaticBuffer functions (#964)
Add unit tests for the various ...GetStaticBuffer() functions added in
https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/641.
---------

Co-authored-by: Paul Bartell <pbartell@amazon.com>
2023-03-20 11:41:13 -07:00
chinglee-iot
77712c6e53
Update unit test for equal priority task (#903)
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>
2023-01-06 10:32:36 +08:00
jasonpcarroll
6f7f9fd9ed [AUTO][RELEASE]: Bump file header version to "202212.00" 2022-12-10 01:17:30 +00:00
jasonpcarroll
b9f2248c5b [AUTO][RELEASE]: Bump file header version to "202211.00" 2022-12-01 00:34:31 +00:00
Gaurav-Aggarwal-AWS
aa316fc1b4
Add a unit test for tasks.c (#867)
* 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>
2022-11-03 11:48:53 -07:00
Gaurav-Aggarwal-AWS
3893cbdb12
Fix test failure in FreeRTOS-Kernel PR #568 (#852)
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>
2022-09-29 12:03:36 +05:30
alfred gedeon
1ac492d6aa
Kernel timers.c tasks.c Unit Test (#539)
* 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>
2022-08-16 14:38:26 -07:00