Commit graph

150 commits

Author SHA1 Message Date
chinglee-iot
28177788d0
Fix vTaskSuspendAll assertion unit test (#1204)
* Update kernel submodule to address vTaskDelete and vTaskSuspend change
2024-04-11 14:49:30 +08:00
ActoryOu
c5c41ef3af
Update result section in README under CBMC folder. (#1196)
* Update result section in README under CBMC folder

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update proofs result path

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2024-03-22 10:43:47 +08:00
chinglee-iot
3f24270b4a
Update kernel xtaskGetHandle unit test (#1186) 2024-03-06 15:24:49 +08:00
chinglee-iot
2adaf8471f
Add SMP disable preemption on target test (#1175)
* Add SMP disable preemption on target test

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2024-02-27 12:13:27 +08:00
chinglee-iot
d9ced6e8ac
Add SMP schedule affinity on target test (#1172)
* Add SMP schedule affinity on target test

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2024-02-27 12:01:25 +08:00
chinglee-iot
ec0eae4c0f
Add SMP disable multiple priorities on target test (#1171)
* Add SMP disable multiple priorities on target test

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2024-02-27 11:45:38 +08:00
chinglee-iot
731a4f05fd
Add SMP schedule highest priority on-target test (#1167)
* Add SMP scheduler highest priority task on target test

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2024-02-27 11:29:15 +08:00
chinglee-iot
2f85ed9bf6
Add SMP schedule equal priority on target test (#1170)
* Add SMP schedule equal priority on target test

* Remove unnecessary config

* Fix spelling format and header

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2024-02-08 11:07:39 +05:30
chinglee-iot
3878dd9657
Add SMP one task enter suspendall on target test (#1183)
* Add SMP one task enter suspendall on target test

* Fix format and spelling

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2024-02-07 22:29:39 +05:30
chinglee-iot
9cb29445cd
Add SMP suspend scheduler on target test (#1184)
* Add SMP suspend scheduler on target test

* Code review suggestion

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2024-02-07 21:52:56 +05:30
Darian
ce28d94516
Update unit tests due to task notification changes (#1177)
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>
2024-02-07 10:51:43 +08:00
chinglee-iot
3c5fbc769b
Update unit test to address vTaskDelete and vTaskSuspend change for SMP (#1178)
* Update the unit test to address the problem task self void state change
2024-02-06 20:30:21 +08:00
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
chinglee-iot
8422d79383
Update on target test for passive idle hook (#1128)
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2024-01-31 16:02:12 +08:00
Moral-Hao
b0c6296cbf
Update all CMock configuration to compare_ptr. (#1123)
Bring the change of CMock configuration in directory tasks
to all other directories.

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2024-01-29 12:35:30 +05:30
Gabriele Monaco
770e93bdfe
Add tests for streambuffers with different notification index (#1150)
* Add tests for streambuffers with different notification index

* Uncrustify: triggered by comment.

* Updated kernel with tested functionality

* Fix typo

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2024-01-29 12:04:40 +05:30
chinglee-iot
d603c9b1ba
Update for vTaskSuspend SMP unit test (#1160) 2024-01-24 19:34:14 +08:00
chinglee-iot
3e1c9a51df
Update SMP unit test for vTaskDelete change (#1158)
* Fix vTaskDelete SMP unit test
2024-01-23 16:37:31 +08:00
chinglee-iot
bd56549a48
Update SMP unit test to cover prvInitialiseTaskLists (#1151)
* Update SMP unit test to cover prvInitialiseTaskLists
2024-01-08 13:12:28 +08:00
chinglee-iot
31d6ace7e0
Add eTaskConfirmSleepModeStatus unit test for SMP (#1118)
* Add eTaskConfirmSleepModeStatus unit test for SMP
2023-12-26 14:16:21 +05:30
chinglee-iot
76c0f8788c
Fix SMP unit test for switch hook (#1133)
* Fix SMP unit test for switch hook
2023-12-11 15:04:20 +08:00
chinglee-iot
0945a8ac50
Update FreeRTOS.h for portSWITCH_TASK_HOOK in unit test (#1131)
* Update FreeRTOS.h for portTASK_SWITCH_HOOK

---------

Co-authored-by: GitHub Action <action@github.com>
2023-12-11 13:29:32 +08:00
chinglee-iot
30fadd8d38
Add unit test for xTaskGetIdleTaskHandleForCore (#1119)
* Add unit test for xTaskGetIdleTaskHandleForCore()

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2023-12-05 13:37:50 +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
chinglee-iot
eccc2545d8
Add back mtCOVERAGE_TEST_MARKER in stream_buffer unit test (#1110)
* Add back mtCOVERAGE_TEST_MARKER in stream_buffer unit test
2023-11-16 12:19:24 +08:00
chinglee-iot
0a62d564c1
Fix unit test for passive idle task (#1116)
* Fix comilation problem with unit test for passive idle task memory
2023-11-16 08:54:39 +08:00
chinglee-iot
174b4562f4
Add test cases to cover prvCreateIdleTasks for SMP (#1114)
* Add test cases to cover vApplicationGetIdleTaskMemory and 
  vApplicationGetPassiveIdleTaskMemory for prvCreateIdleTasks
2023-11-15 15:39:50 +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
Monika Singh
f60dd88609
Remove deprecated ipconfigRAND32 (#1108)
* Remove deprecated ipconfigRAND32

* Uncrustify: triggered by comment.

* Update

* Check for return value

* Uncrustify: triggered by comment.

* Update

---------

Co-authored-by: GitHub Action <action@github.com>
2023-11-01 12:33:25 +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
80db00d98b
Add uxQueueGetQueueLength API in queue unit tests (#1074)
* Add uxQueueGetQueueLength API in queue unit tests
for code coverage

* Update Submodule pointer for Kernel V10.6.1

Signed-off-by: kar-rahul-aws <karahulx@amazon.com>
2023-08-18 16:13:50 +05:30
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
kar-rahul-aws
278e6c4b49
Update ReadMe (#1044)
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2023-07-24 14:20:29 +05:30
kar-rahul-aws
8b98d08bcc
Update queue Unit Tests to add uxQueueItemSize (#1040)
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2023-07-18 15:12:00 +05:30
kar-rahul-aws
6682dbbc5b
Update submodule pointer for Kernel V10.6.0 (#1037)
* Update submodule pointer for Kernel V10.6.0

* Update commit hash

* Fix failed CBMC proofs

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update manifest.yml

* Update hash commit to match submodule

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-07-18 09:28:02 +05:30
kar-rahul-aws
5d94b20aa8
Make changes required for MPU enhancements (#1034)
1. Add macro configUSE_MPU_WRAPPERS_V1 to allow Demo compatibility with
the old mpu wrapper .

2. Add Dummy xMPU_SETTINGS in portmacro.h file for Unit Tests .

Signed-off-by: kar-rahul-aws <karahulx@amazon.com>
2023-07-13 16:32:05 +05:30
Aniruddha Kanhere
1277ba1661
Revert "Remove coroutines (#874)" (#1019)
* Revert "Remove coroutines (#874)"

This reverts commit 569c78fd8c.

* Update freertos Kernel submodule to latest head

* Remove temporary files

* Fix MingW demos and spell check

* Fix manifest version; fix headers

* Add ignore files and paths to core-checker.py

* Fix copyright in remaining files

* Fix PR check build failure

1. Remove defining `inline` in Makefile. This was causing build
   warnings.
2. Ensure that the linker removed unused functions from various
   compilation units.
3. Update the linker script so that all the functions are correctly
   placed in FLASH section.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-06-09 15:25:48 -07:00
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
Gaurav-Aggarwal-AWS
3c09383fab
Fix CBMC proof failures (#946)
* Fix CBMC proof failures

These were introduced in PR #620.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update manifest

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-03-06 15:15:38 +05:30
ActoryOu
67911f83a6
Create SMP on target test framework. (#911)
* Framework initialization.

* Move testRunner.c to test case subfolder.

* Update README doc and formatting.

* Add default configurations in test_config.h.

* Fix License & formatting check.

* Fix typo.

* Move setup/teardown functions to main.c file.

* Move setup/teardown functions back.

* Update README doc.

* Patch for comments.

* Correct test runner file name.

* Move test_config.h to the end of FreeRTOSConfig.h.

* Add undef in test_config.h and description in README doc.

* Correct the file format.

* Fix chinglee-iot comments.

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix spell check

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-03-06 13:17:27 +05:30
Kareem Khazem
408c3841ea
Add CBMC proof-running GitHub Action (#924)
This commit adds a GitHub Action that runs the CBMC proofs upon every
push and pull request. This is intended to replace the current CBMC CI.
2023-03-03 14:35:42 -08:00
Kareem Khazem
c7b3124565
Use CBMC XML output to enable VSCode debugger (#912)
Prior to this commit, CBMC would emit logging information in plain text
format, which does not contain information required for the CBMC VSCode
debugger. This commit makes CBMC use XML instead of plain text.

Co-authored-by: Mark Tuttle <tuttle@acm.org>
2023-01-13 13:03:06 -08:00