RDKB-64617: RDKB-65225, RDKB-65227 Set Default RFC values on Fully Deployed RFC Features (Adv…#81
Open
akumar0702 wants to merge 7 commits into
Open
RDKB-64617: RDKB-65225, RDKB-65227 Set Default RFC values on Fully Deployed RFC Features (Adv…#81akumar0702 wants to merge 7 commits into
akumar0702 wants to merge 7 commits into
Conversation
…anceSecurity) Reason for change: enable Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AdvanceSecurityCujoTelemetry.Enable & Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AdvanceSecurityCujoTracer.Enable to true Test Procedure: Ensure default value persists on FR scenario's and no functionality issue observed. Risks: Low Signed-off-by: arunkumar_nagulapally@comcast.com
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates RFC initialization behavior so Cujo Tracer and Cujo Telemetry default to enabled when their syscfg values are missing or disabled.
Changes:
- Adds a reusable helper to apply default-TRUE behavior for RFC syscfg-backed booleans.
- Uses the helper for Cujo Tracer and Cujo Telemetry during
CosaSecurityInitialize. - Adds unit tests for the helper’s defaulting and no-write paths.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
source/AdvSecurityDml/cosa_adv_security_internal.c |
Applies default-TRUE behavior for Cujo Tracer/Telemetry and adds the shared helper. |
source/AdvSecurityDml/cosa_adv_security_internal.h |
Declares the new helper. |
source/test/CcspAdvSecurityDmlTest/CcspAdvSecurityInternalTest.cpp |
Adds tests for the helper behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| g_pAdvSecAgent->pAdvSecUserSpace_RFC->bEnable = ValueASUSERSPACE_RFC; | ||
| } | ||
| g_pAdvSecAgent->pAdvSecUserSpace_RFC->bEnable = ValueASUSERSPACE_RFC; |
| { | ||
| ANSC_STATUS ret = ANSC_STATUS_SUCCESS; | ||
|
|
||
| if ((getStatus != ANSC_STATUS_SUCCESS) || (value == 0)) |
| { | ||
| ANSC_STATUS ret = ANSC_STATUS_SUCCESS; | ||
|
|
||
| if (getStatus != ANSC_STATUS_SUCCESS) |
| CcspTraceInfo(("AdvSecUserSpace_RFC is defaulted to TRUE, cannot be set to FALSE \n")); | ||
| return FALSE; | ||
| } | ||
| returnStatus = CosaAdvSecUserSpaceDeInit(g_pAdvSecAgent->pAdvSecUserSpace_RFC); |
56e189d to
01d21c2
Compare
akumar0702
commented
Jun 1, 2026
Comment on lines
+2287
to
+2306
| EXPECT_CALL(*g_safecLibMock, _sprintf_s_chk(_, _, _, _)) | ||
| .Times(1) | ||
| .WillOnce(Return(0)); | ||
| EXPECT_CALL(*g_syscfgMock, syscfg_set_nns(StrEq(AdvSecCujoTelemetryEnabled), _)) | ||
| .Times(1) | ||
| .WillOnce(Return(0)); | ||
| EXPECT_CALL(*g_syscfgMock, syscfg_commit()) | ||
| .Times(1) | ||
| .WillOnce(Return(0)); | ||
|
|
||
| ANSC_STATUS status = CosaAdvSecApplyRfcDefaultTrue( | ||
| (char*)AdvSecCujoTelemetryEnabled, | ||
| ANSC_STATUS_SUCCESS, | ||
| 0, | ||
| &enable, | ||
| "AdvSecCujoTelemetry_RFCEnable"); | ||
|
|
||
| EXPECT_EQ(status, ANSC_STATUS_SUCCESS); | ||
| EXPECT_EQ(enable, TRUE); | ||
| } |
Comment on lines
+1402
to
+1421
| returnStatus = CosaAdvSecApplyRfcDefaultTrue( | ||
| g_AdvSecCujoTracerEnabled, | ||
| getCujoTracerRfcStatus, | ||
| ValueASCUJOTRACER_RFC, | ||
| &g_pAdvSecAgent->pAdvSecCujoTracer_RFC->bEnable, | ||
| "AdvSecCujoTracer_RFCEnable"); | ||
|
|
||
| returnStatus = CosaAdvSecApplyRfcDefaultTrue( | ||
| g_AdvSecCujoTelemetryEnabled, | ||
| getCujoTelemetryRfcStatus, | ||
| ValueASCUJOTELEMETRY_RFC, | ||
| &g_pAdvSecAgent->pAdvSecCujoTelemetry_RFC->bEnable, | ||
| "AdvSecCujoTelemetry_RFCEnable"); | ||
|
|
||
| returnStatus = CosaAdvSecApplyRfcDefaultTrue( | ||
| g_AdvSecUserSpaceEnabled, | ||
| getUserSpaceRfcStatus, | ||
| ValueASUSERSPACE_RFC, | ||
| &g_pAdvSecAgent->pAdvSecUserSpace_RFC->bEnable, | ||
| "AdvSecUserSpace_RFCEnable"); |
Comment on lines
+3114
to
+3117
| if( bValue ) | ||
| returnStatus = CosaAdvSecUserSpaceInit(g_pAdvSecAgent->pAdvSecUserSpace_RFC); | ||
| else | ||
| { | ||
| //returnStatus = CosaAdvSecUserSpaceDeInit(g_pAdvSecAgent->pAdvSecUserSpace_RFC); | ||
| CcspTraceInfo(("AdvSecUserSpace_RFC is defaulted to TRUE, cannot be set to FALSE \n")); | ||
| return FALSE; | ||
| } | ||
| returnStatus = CosaAdvSecUserSpaceDeInit(g_pAdvSecAgent->pAdvSecUserSpace_RFC); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reason for change: enable Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AdvanceSecurityCujoTelemetry.Enable & Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AdvanceSecurityCujoTracer.Enable to true
Test Procedure: Ensure default value persists on FR scenario's and no functionality issue observed.
Risks: Low
Signed-off-by: arunkumar_nagulapally@comcast.com