* 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.
* 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>
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.
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>
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>
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>
Update SiFive IAR demo to support vectored interrupts. This is a near copy of https://github.com/FreeRTOS/FreeRTOS/pull/797.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.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>
* Undo syntax changes preventing VeriFast parsing
* Update proofs inline with source changes
Outstanding:
- xQueueGenericReset return code
- Not using prvIncrementQueueTxLock or prvIncrementQueueRxLock macros
* Remove git hash check
* Document new changes between proven code and implementation
* Update copyright header
* VeriFast proofs: turn off uncrustify checks
Uncrustify requires formatting of comments that is at odds with VeriFast's
proof annotations, which are contained within comments.
* Update ci.yml
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.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>
* Created a generic portmacro.h file in the CBMC include folder instead of using the default MSVC-MingW one. This allows each proof to define the portmacro constants it needs and cover all code in the Task Scheduler
* Removed the license text from the portmacro file
* Fix CI checks
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>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.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>
Add a hardware definition project for the MicroZed board to the existing Zynq ZC702 project.
Add a text file that describes how to switch the Zynq project form the ZC702 hardware to the MicroZed hardware.
These tests cover the following portion in the queue code:
static void prvUnlockQueue( Queue_t * const pxQueue )
{
...
if( prvNotifyQueueSetContainer( pxQueue ) != pdFALSE )
{
/* The queue is a member of a queue set, and posting to
* the queue set caused a higher priority task to unblock.
* A context switch is required. */
vTaskMissedYield();
}
else
{
mtCOVERAGE_TEST_MARKER();
}
...
}
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Update History.txt and README.md for December release (#744)
* Update History.txt and README.md for release
* Bump mbedtls submodule to v2.28.0 (#745)
* Patch project files for mbedtls (#751)
* Apply group 1 patches
* Apply patches for group 2
* Update project files for mbedTLS new version
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Fix warnings in projects
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Fix warnings in HTTP_S3_Download demo
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
* Update changelog and history for corePKCS11 update (#752)
* Update submodule pointer and manifest.yml for corePKCS11 (#754)
* Update readme and history.txt to show that Sigv4 is a newly added library (#756)
* Revert update to v143 of VS toolset (#757)
* [AUTO][RELEASE]: Bump file header version to "202112.00"
* Update file headers to satisfy core checks
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: johnrhen <johnrhen@users.noreply.github.com>