This CBMC test would go over the memory limit of most hosts, causing the
kernel to kill the process. With larger memory capabilities, this can be
re-enabled.
* Add RISC-V demo for the spike simulator.
* Figuring out what the header checker wants.
* Fix more headers.
* Ignore htif.c and htif.h for header checks.
These files are already stamped with BSD-3-Clause, which I'm not allowed
to remove. There are numerous other files with the same license in
FreeRTOS, so I assume this is fine.
* Use proxy syscalls for RV32.
Looks like spike won't be changed to make htif character writes work
propery for RV32.
This is now an even closer copy of the version in opensbi, which is
arguably strictly better.
* Support RV64 builds to use with spike.
OpenOCD does not currently support debugging 64-bit FreeRTOS, but now
that I have a target to test hopefully that will be remedied shortly.
* Tweak rv32 instructions.
This way you can have separate cross-tools installations that can
coexist side by side.
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
* Fix Tasks.c patch, line numbers were out of sync and patching was
broken.
* Add assumption to TaskCreate proof that a task's priority is less than
the configured max.
With the introduction of
9efe10b805
an assertion is added to ensure a new task's priority is less than the
confirmed max. The CBMC proof for TaskCreate needs to include this assumption
in order to not assert and fail. Since this is now enforced in the code
we can add an assumption to the proof that a task must be created with a
priority smaller than the configured max.
* Added event_groups.c Unit Test.
* Formatted and more comments.
* Formatted
* Split some test cases and add comment and coverage tag.
* Update test cases.
* Remove xEventGroupDelete Invalid Input test case, since the implementation does not handle this.
When gcov outputs into it's intermediate json format, sometimes it marks blocks as unexecuted but also sets an execution count != 0. In this case, the "count" field is correct, but the "unexecuted_block" field is incorrect.
When outputting lcov formatted coverage data in filtercov.py, only output a branch coverage data lines (BRDA) with a "-" for the "taken" field when both count==0 and unexecuted_block==true in the input gcov json intermediate file.
Collect initial coverage data with lcov --initial and add this to coverage data to the combined coverage from each test binary.
This ensures that all functions in the target file(s) are included in coverage statistics, even if those functions are not tagged in a _utest.c file.
Note: Functions which are excluded by the preprocessor will not have initial coverage data generated for them.
* Introduce tasks that test the coherency of the reported space available in a message buffer from two separate tasks. Designed to highlight the issue reported in https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/264
Introduce configRUN_ADDITIONAL_TESTS which must be set to 1 to run the new tests. That is because the new tests got added to an existing standard demo file and smaller platforms may not have the resources to run them.
Set configRUN_ADDITIONAL_TESTS to 1 in the MSVC and IAR/QEMU project so both project run the new test.
Also add missing 'volatile' qualifier in the IAR/QEMU project on some register accesses.
* Update xAreMessageBufferTasksStillRunning() to report errors from the new message buffer size coherency tests.
Co-authored-by: RichardBarry <ribarry@amazon.com>
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
* Add INCLUDE_DIR to the commandline call to cflow in callgraph.py
This removes dependent functions from the list when they are disabled in the FreeRTOS config.
* Add argparse to callgraph.py so that no output file is created on failure.
* Make the address sanitizer optional
The address sanitizer is now disabled by default for CMock tests because it introduces additional branches into the compiled code. When make is run with the ENABLE_SANITIZER=1 argument, the address sanitizer is enabled and coverage data may not be accurate.
* Change from ifdef to ifeq ($(ENABLE_SANITIZER),1) to address PR comment
* Cleanup Makefiles
* Add lcovrc configuration file
* Add CMock test build directory to .gitignore
* Add callgraph.py and filtercov.py scripts
* Cleanup list Makefile and update list_utest.c with coverage tags
* Add information about coverage filtering and running single test cases
* Remove -fprofile-exclude-files for compatibility with older versions of gcc.
Fix line endings (change to unix style)
* Lint callgraph.py and filtercov.py. Print and error when no target functions are defined.
* Indent with spaces when possible
* Replace tabs with spaces and enable .RECIPEPREFIX
* Add fake_port.h and related portmacro.h changes
* Fix list makefile when bin directory is not available
* Clean up grouped rules
* Update makesfile.. Add "two_tests" example dir
* Fix memory checker error
* Move common makefile items to subdir.mk and testdir.mk includes
* Update core_checker.py exclusions
* Remove line from portmacro.h that doesn't match core_checker.py
* Initial version of the CORTEX_MPS2_QEMU_IAR - needs tidying up and so far only contains the comprehensive demo.
* Update the comment block at the top of the source files to match the latest official release.
* Split out the main_full() demo from main(). Still need to add in the main_blinky() demo.
* Add the blinky demo option.
* Tidy up the QEMU/IAR project.
* Configure the QEMU IAR project to only create the blinky demo.
* Delete readme.txt which was in the wrong directory.
* Fix errors in the comments at the top of the file as highlighted by the auto checks.
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
* Enable libunitymemory extension to track dynamic memory usage during unit tests
* Use UnityMemory in timers_utest.c
* Add fake_assert.h to allow mocking of configASSERT calls
* Add .editorconfig to make github show indentation correctly
* Add unity memory and fake_assert to queue_utest.c
* Add -fsanitize=address CFLAG when running unit tests
* Define mtCOVERAGE_TEST_MARKER macro to include mtCOVERAGE_TEST_MARKER lines in coverage figures
* Add additional memory check / protection CFLAGS for CMock tests
* Fix out of bounds array access in list_utest.c
* Move the fake_assert.h include to the top of FreeRTOSConfig.h
Update to out of source makefile build and add run-cbmc-proofs.py
CBMC proofs can now be run with Litani with the command
"./run-cbmc-proofs.py"
Based on commits:
* 1646301 - Ignore CBMC proof failures, fail the build later (4 months ago) <Kareem Khazem>
* 7e8c91a - Fix Makefile prerequisite symbol for CBMC proofs (4 months ago) <Kareem Khazem>
* bee04be - Enable CBMC proofs to run in CI (4 months ago) <Kareem Khazem>
Found in https://github.com/FreeRTOS/FreeRTOS-Plus-TCP
It is recommended by the AWS IoT Jobs service to use DescribeJobExecution API for scaling purposes instead of StartNextPendingJobExecution API. Thus, update the Jobs demo to replace the latter API call with the former API call.
* Implement Kernel Unit Test Framework with CMock
* Add Readme.md to unit tests
* Add Posix build checker to git actions
* Add Ruby requirement
* Fix file header checks
* Fix header checks
* Add color output to test runs
* Clean up demo config for wolfSSL mutual auth.
* Add comment about picking the correct ROOT CA.
* uncrustify using_wolfSSL.c and some other code style changes.
* Apply suggestions from code review
Co-authored-by: Archit Aggarwal <architag@amazon.com>
FreeRTOS_send adds the packet to be sent to the IP task's queue for
later processing. The packet is sent later by the IP task. When
FreeRTOS is used in collaborative mode (i.e. configUSE_PREEMPTION is 0),
the Plaintext_FreeRTOS_send function returns without actually sending
the packet as the IP task never gets a chance to run.
The fact that Plaintext_FreeRTOS_send returns without actually sending
the packet causes an issue in the MQTT_Connect which expects the CONNECT
packet to be actually sent and waits for CONNACK.
This commit adds a taskYIELD call after calling FreeRTOS_send to ensure
that the IP task gets a chance to run and send the packet before the
Plaintext_FreeRTOS_send function returns.