<!--- Title -->
Description
-----------
<!--- Describe your changes in detail. -->
**Issue1:**
Mocked function calls jump to real implementation instead of mocks on
mac
**Solution:**
Convert the symbols of the mocked implementation from weak to strong
**Issue2:**
lcov generating wrong coverage reports on mac
**Solution:**
Rectifying network buffer size to be of the appropriate value otherwise
memset clears out more memory spaces than required which leads to
reseting the line coverage counters.
**Issue3:**
log statements being taken as branches
**Solution:**
Removing the ternary operation to figure out if there is a '/' in front
of the file name or not. This can be done as this feature is just for
debugging purposes.
**Issue4:**
Some tests failing randomly on mac
**Solution:**
Initialise variables at places where necessary
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
---------
Co-authored-by: Dakshit Babbar <dakshba@amazon.com>
<!--- Title -->
Description
-----------
* Update the release action for version number include the following
files
- docs/doxygen/config.doxyfile - PROJECT_NUMBER
- manifest.yml file - version
- source file - version header
- core_mqtt.h - version number
* Add version number check in "Create ZIP and verify package for release
asset" steps. Including the following
- docs/doxygen/config.doxyfile - PROJECT_NUMBER
- manifest.yml file - version
- source file - version header
- core_mqtt.h - version number
* Update all the version number to "v2.3.0+" and "\<DEVELOPMENT
BRANCH\>"
Test Steps
-----------
Using release action to create release should update the following
* source/include/core_mqtt.h version number
* source files header version number
* doxygen version number
* manifest.yml number
* SBOM file
Tested in personal fork without problem :
https://github.com/FreshDevGo/coreMQTT/actions/runs/9885707328/job/27304218049
Test with wrong source file version number :
https://github.com/FreshDevGo/coreMQTT/actions/runs/9885727002/job/27304274003
Test with wrong manifest.yml version number :
https://github.com/FreshDevGo/coreMQTT/actions/runs/9885726029/job/27304270303
Test with wrong doxygen version number :
https://github.com/FreshDevGo/coreMQTT/actions/runs/9885723302/job/27304269170
Test with wrong version number macro in core_mqtt.h :
https://github.com/FreshDevGo/coreMQTT/actions/runs/9885724835/job/27304268841
Checklist:
----------
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [x] I have tested my changes. No regression in existing tests.
- [ ] ~~I have modified and/or added unit-tests to cover the code
changes in this Pull Request.~~
Related Issue
-----------
<!-- If any, please provide issue ID. -->
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
<!--- Title -->
Description
-----------
This PR update changelog, version numbers and .md (doxygen, size table)
files for release
Test Steps
-----------
<!-- Describe the steps to reproduce. -->
Checklist:
----------
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [ ] I have tested my changes. No regression in existing tests.
- [ ] I have modified and/or added unit-tests to cover the code changes
in this Pull Request.
Related Issue
-----------
<!-- If any, please provide issue ID. -->
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
The loggging defaults were split out since they are not namespaced to
coreMQTT, and they previously leaked to all files including a coreMQTT
header. Splitting them allowed the logging defaults to only be pulled
into coreMQTT source files. Now that no header files use the config
headers, and thus all coreMQTT config only affects coreMQTT source
files, the split is no longer needed.
* Add SPDX identifier to source files
* Add license information to CBMC stub
* Fix spellcheck and the formatting
* Update version numbers and .md files for reelase
Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
* Update ci.yml (#197)
* Update ci.yml
* Add main branch in the CI YAML
* Add cancel callback API (#196)
* Add cancel callback command
* Update the function name
* Fix formatting
* Update memory estimates
* Add State to MQTT_ProcessLoop so that it can be called in a non-blocking manner (#198)
* Add stateful process-loop function
* Add extra checks; fix bugs and add description of functions
* Add index based stateful processloop
* Clean up
* Renamed functions to make them more coherent with their function
* Remove unused function declarations
* Fixed failing CI checks from previous commits except unit-test
* Fixed spell check and updated size-table
* Fix CBMC proofs
* Empty-Commit to trigger CBMC proofs
* Fix loop unwinding values in the Makefile
* Add upper bound on the buffer size of MQTT
* Increase minimum limit on buffer size to >0
* Add upper bound on the size of the buffer as well
* CBMC: Add memmove stub to accelerate coverage
The commit adds a stub for memmove accelerate CBMC coverage
calculation. Without this stub, coverage for `MQTT_ProcessLoop` and
`MQTT_ReceiveLoop` fails to converge (gets stuck generating the SAT
formula for the memmove in `receiveSingleIteration`). This stub
checks that src and dst are nonnull pointers and havocs dst.
* Fix formatting
Co-authored-by: Aniruddha Kanhere <ubuntu@ip-172-31-25-12.us-west-2.compute.internal>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
* Remove the use of common buffer (#199)
* Make publish use internal buffers
* Fix comment about packet ID
* Try a different approach for ping and disconnect
* Use writev and flush in conjuction with send
* Update the publish method to use vectors
* Add vectored IO to all functions
* Fix formatting
* Reduce complexity score
* Fix spell check and complexity score
* Fix breaking build
* Add doxygen comments
* Fix doxygen part 2
* Doxygen fix part 3
* Fix doxygen part 4
* Fix some checks
* Fix memory tables
* Fix some small errors
* Fix compiler warnings and breaking CI checks from previous commit
* Fix spell check and doxygen
* Fix a couple of CBMC proofs
* Fix ping and publish proofs
* Update the function name
* Fix more CBMC proofs
* Fix MQTT Connect proof
* Add unwinding loops
* Fix last CBMC proof
* Fix formatting
* Update the Subscribe and Unsubscribe functions
* Fix formatting and doxygen checks
* Fix broken CBMC proofs
* Fix memory statistic table
* Revert changes from serializer source
* update comments to clarify write requirements
* Add a note for write function pointer
* Fix spell check
* Update changelog (#202)
* Update MQTT logging so that log levels of the library do not leak (#205)
* Replace publish state arrays with pointers
Added an MQTT_InIt function for QoS > 0 publishes
Fixed functions which were dealing with state arrays
* Fix CI checks and clean up
* Fix CBMC proofs
* Fix sub and unsub CBMC proofs
* Fix remaining proofs
* Fix remaining CI checks
* Fix spell check
* Minor typo fix (#209)
* Update core_mqtt.h (#208)
* Update core_mqtt.h
* Update core_mqtt.h
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
* Update documentation and Doxygen comments in the source (#206)
* Update comments of the MQTT_InIt function
* Updating documentation of more of functions
* Fix formatting and spell check
* Update core_mqtt.h
* Add hooks to the source code (#200)
* Add mutex hooks
* Clean up of code
* Add doxygen comments and fix spell check
* Fix LogError call
* Fix formatting and memory table
* Fix dereference failure
* Update the hook names
* Fix broken builds
* Update the macros and variables
* Reword the briefs of hooks and uncrustify
* Fir formatting
* Protect get packet ID
* Fix formatting
* Fix Unit tests (#212)
* Fix Unit tests
* Update unit tests after new changes
* Fix more UT
* add dummy calls to the transport
* fix build error
* Remove usused variables
* Remove unsused variables
* Remove usused variables
* Unsued parameter
* Fix ut failure
* Fix uninitialized unit test variables
* Fix ut expectation
* Fix unit-tests
* Fix unit test uninitialized variable
* increase unit test coverage
* increase unit test coverage
* Fix unit test build
* State coverage 100%
* Serializer 100% coverage
* 100% UT coverage
* Fix formatting
* Fix size table
* Address PR comments
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
* Remove unnecessary ternaries (#211)
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
* Fix misra deviations (#213)
* MISRA compliance update 1
* Fix MISRA errors
* Zero MISRA violations; 13 suppressed
* Fix CI checks
* Update MISRA.md
* Remove deviations
* Fix MISRA.md file
* Fix bug - wasn't incrementing vector length properly.
* Remove unwanted files
* Update comment to clarify the control flow of UT
* Remove 'dev' branch from the CI checks
* Update horrid threshold = 10
Co-authored-by: Aniruddha Kanhere <ubuntu@ip-172-31-25-12.us-west-2.compute.internal>
Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
Co-authored-by: Archit Gupta <71798289+archigup@users.noreply.github.com>
core_mqtt.h and other coreMQTT headers pull in core_mqtt_config.h and core_mqtt_config_defaults.h.
core_mqtt_config_defaults.h defines empty logging macros. This means every application that uses coreMQTT needs to be careful to set up the logging stack before including core_mqtt.h or they may mysteriously not have logging output.
The logging setup should be in each compilation object, not set up in headers. This moves the inclusion of default logging macros from the headers to the library c files.
This fixes the issue with the logging macros for customers who do not set the logging macros in their core_mqtt_config.h. However, those who do enable logging for coreMQTT will still have their coreMQTT logging setup in all their c files using coreMQTT.
Non-functional change to handle all enum values for MQTTPublishState_t
and MQTTQoS_t in switch statements. This allows users to compile with
-Werror=switch-enum.
* Update version numbers
* Update CHANGELOG.md
* Add guards for C++ linkage
* Link to Memory estimates markdown from README
* Make possible to override CMake C Standard for tests
* Add version numbers
* Add missing @file tags
* Update lexicon.txt
* Update @brief tag for MQTT cbmc state
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>