RDKCOM-5487: RDKBWIFI-206: add mocks, build, and limited platform independent L1 tests #702
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR creates a set of L1 unittests for limited set of functions in the file
source/core/wifi_ctrl_webconfig.cThe tests emphasize pointer safety to capture inputs which are currently at risk for null pointer dereferences. In order to support the tests, the following changes have been made to the build:
.github/workflows/makefile.ymlhas been updated to add an additional platform (mockplatform) in the strategy matrixbuild/linux/bpi/makefileandbuild/linux/rpi/makefilehave been updated to accommodate the split$(WIFI_RDK_HAL)/platformThis PR uses objcopy to create a version of the object file with the main symbol stripped out from wifi_mgr.o before linking the gtest binary.
Unit test notes:
WifiCtrlWebconfig.DISABLED_VifNeighborsApplyHappyPathCheckDestroyedMapPtris currently disabled becausewebconfig_vif_neighbors_applyfrees the data member of the argumentwebconfig_subdoc_decoded_data_t *databut does not set the member toNULLafter the free, leaving the invalid pointer.The other tests focus on exercising the logic updated by:
on-behalf-of: @permanence-ai github-ai@permanence.ai