Skip to content

RDKB-67395: Data model and event-based marker with whitespace value a… - #457

Open
tabbas651 wants to merge 6 commits into
developfrom
topic/RDKB-67395
Open

tabbas651 wants to merge 6 commits into
developfrom
topic/RDKB-67395

Conversation

@tabbas651

Copy link
Copy Markdown
Contributor

Reason for change: PR #406 (RDKB-64502) treated any marker value whose first character is a space as empty, and any value starting with "NULL" as empty. Subscribed data model and event markers such as " test log " or " xyz " were therefore dropped when the event was stored and again when the report was built. Now a value is empty only if it is NULL, exactly "NULL", "" or whitespace only. Values with leading or trailing spaces are reported, and trimmed only when trim is true.
Test Procedure: Configure a profile with subscribe data model markers and event markers (trim true and false). Send values with leading and trailing spaces and
verify they appear in the cJSON report. Verify "", " " and "NULL" are still
skipped when reportEmpty is false.
Risks: Medium
Priority: P1

…re not reflected in the report

Reason for change: PR #406 (RDKB-64502) treated any marker value whose first
character is a space as empty, and any value starting with "NULL" as empty.
Subscribed data model and event markers such as " test log " or " xyz " were
therefore dropped when the event was stored and again when the report was built.
Now a value is empty only if it is NULL, exactly "NULL", "" or whitespace only.
Values with leading or trailing spaces are reported, and trimmed only when trim
is true.
Test Procedure: Configure a profile with subscribe data model markers and event
markers (trim true and false). Send values with leading and trailing spaces and
verify they appear in the cJSON report. Verify "", "   " and "NULL" are still
skipped when reportEmpty is false.
Risks: Medium
Priority: P1

Signed-off-by: Thamim Razith Abbas Ali <tabbas651@comcast.com>
@tabbas651
tabbas651 requested a review from a team as a code owner October 27, 2026 20:03
@github-actions

Copy link
Copy Markdown

Code Coverage Summary

                                         |Lines       |Functions  |Branches    
Filename                                  |Rate     Num|Rate    Num|Rate     Num
================================================================================
[/mnt/L1_CONTAINER_SHARED_VOLUME/source/]
bulkdata/datamodel.c                      |72.5%    218|88.9%     9|    -      0
bulkdata/profile.c                        |26.9%   1132|73.5%    34|    -      0
bulkdata/profilexconf.c                   |48.3%    530|85.0%    20|    -      0
bulkdata/reportprofiles.c                 |57.5%    586| 100%    27|    -      0
bulkdata/t2eventreceiver.c                |64.1%    301| 100%    10|    -      0
bulkdata/t2markers.c                      |80.5%    169|83.3%    12|    -      0
ccspinterface/busInterface.c              |86.8%     53|85.7%     7|    -      0
ccspinterface/rbusInterface.c             |74.3%    946|97.2%    36|    -      0
commonlib/telemetry_busmessage_sender.c   |40.4%    396|84.2%    19|    -      0
dcautil/dca.c                             |73.0%    690| 100%    20|    -      0
dcautil/dcaproc.c                         |84.3%    230| 100%     7|    -      0
dcautil/dcautil.c                         |78.9%    185| 100%     6|    -      0
dcautil/legacyutils.c                     |79.0%    105| 100%     7|    -      0
privacycontrol/rdkservices_privacyutils.c | 100%     11| 100%     2|    -      0
protocol/http/curlinterface.c             | 100%     24| 100%     3|    -      0
protocol/http/multicurlinterface.c        |57.1%    431|83.3%    12|    -      0
protocol/rbusMethod/rbusmethodinterface.c |60.0%    105|50.0%     6|    -      0
reportgen/reportgen.c                     |55.8%    930| 100%    22|    -      0
scheduler/scheduler.c                     |70.2%    413| 100%    13|    -      0
t2parser/t2parser.c                       |59.4%   1939|88.5%    26|    -      0
t2parser/t2parserxconf.c                  |89.7%    195| 100%     3|    -      0
utils/persistence.c                       |78.7%    253| 100%    10|    -      0
utils/t2MtlsUtils.c                       |82.6%     46|75.0%     4|    -      0
utils/t2collection.c                      |89.6%    201| 100%    18|    -      0
utils/t2common.c                          |63.8%    185|73.3%    15|    -      0
utils/t2log_wrapper.c                     |69.2%     26|50.0%     2|    -      0
utils/vector.c                            |94.9%     79| 100%     8|    -      0
================================================================================
                                   Total:|61.0%  10379|90.5%   358|    -      0

RDKE-1120: Automated component release workflow (#451)
Comment thread source/bulkdata/profile.c Resolved
Copilot AI balanced review requested due to automatic review settings November 3, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The changed report-time and marker-storage filters lack regression tests that distinguish retained content from empty or exact "NULL" values and verify reportEmpty and trimming behavior.

3 open issues
What changed in this PR

Corrects overly broad empty-value filtering introduced by #406 so subscribed data-model and event markers retain meaningful values with surrounding whitespace or a "NULL" prefix.

Changes:

  • Treat only null pointers, exact "NULL", empty strings, and whitespace-only strings as empty.
  • Apply the corrected classification during profile storage and event-report encoding, leaving trimming controlled by the existing setting.
File Description
source/​reportgen/​reportgen.c Adds precise empty-value detection for event-marker JSON encoding.
source/​bulkdata/​profilexconf.c Corrects empty-value classification for XConf marker storage.
source/​bulkdata/​profile.c Corrects empty-value classification for profile marker storage.

Review effort: Balanced

Comment thread source/bulkdata/profile.c Resolved
Comment thread source/bulkdata/profilexconf.c Resolved
Comment thread source/reportgen/reportgen.c Resolved
Copilot AI balanced review requested due to automatic review settings November 3, 2026 20:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The empty-string regression exposes a heap-buffer overflow in the trimmer, while unresolved cJSON mock interposition causes retained-value tests to fail instead of validating serialization.

2 open issues
3 resolved since last review

Review effort: Balanced

Comment on lines +1599 to +1601
marker.u.markerValue = strdup(testCase.value);
ASSERT_NE(marker.u.markerValue, nullptr);
EXPECT_EQ(encodeEventMarkersInJSON(report, markers), T2ERROR_SUCCESS);
Comment thread source/test/reportgen/reportgenTest.cpp Resolved
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Code Coverage Summary

                                         |Lines       |Functions  |Branches    
Filename                                  |Rate     Num|Rate    Num|Rate     Num
================================================================================
[/mnt/L1_CONTAINER_SHARED_VOLUME/source/]
bulkdata/datamodel.c                      |72.5%    218|88.9%     9|    -      0
bulkdata/profile.c                        |31.9%   1132|76.5%    34|    -      0
bulkdata/profilexconf.c                   |49.4%    530|85.0%    20|    -      0
bulkdata/reportprofiles.c                 |57.5%    586| 100%    27|    -      0
bulkdata/t2eventreceiver.c                |64.1%    301| 100%    10|    -      0
bulkdata/t2markers.c                      |80.5%    169|83.3%    12|    -      0
ccspinterface/busInterface.c              |86.8%     53|85.7%     7|    -      0
ccspinterface/rbusInterface.c             |74.3%    946|97.2%    36|    -      0
commonlib/telemetry_busmessage_sender.c   |40.4%    396|84.2%    19|    -      0
dcautil/dca.c                             |73.0%    690| 100%    20|    -      0
dcautil/dcaproc.c                         |84.3%    230| 100%     7|    -      0
dcautil/dcautil.c                         |78.9%    185| 100%     6|    -      0
dcautil/legacyutils.c                     |79.0%    105| 100%     7|    -      0
privacycontrol/rdkservices_privacyutils.c | 100%     11| 100%     2|    -      0
protocol/http/curlinterface.c             | 100%     24| 100%     3|    -      0
protocol/http/multicurlinterface.c        |57.1%    431|83.3%    12|    -      0
protocol/rbusMethod/rbusmethodinterface.c |60.0%    105|50.0%     6|    -      0
reportgen/reportgen.c                     |56.6%    930| 100%    22|    -      0
scheduler/scheduler.c                     |70.2%    413| 100%    13|    -      0
t2parser/t2parser.c                       |59.4%   1939|88.5%    26|    -      0
t2parser/t2parserxconf.c                  |89.7%    195| 100%     3|    -      0
utils/persistence.c                       |78.7%    253| 100%    10|    -      0
utils/t2MtlsUtils.c                       |82.6%     46|75.0%     4|    -      0
utils/t2collection.c                      |89.6%    201| 100%    18|    -      0
utils/t2common.c                          |63.8%    185|73.3%    15|    -      0
utils/t2log_wrapper.c                     |69.2%     26|50.0%     2|    -      0
utils/vector.c                            |94.9%     79| 100%     8|    -      0
================================================================================
                                   Total:|61.6%  10379|90.8%   358|    -      0

Copilot AI balanced review requested due to automatic review settings November 3, 2026 22:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

An enum-type mismatch prevents the XConf tests from compiling, and missing cJSON_CreateString forwarding causes report-generation tests to fail with interposable libcjson builds.

2 open issues
1 previously missed issue

In code that hasn't changed since last review

High severity Cast XConf enum values to the fixture parameter type

source/​test/​bulkdata/​profilexconfTest.cpp:626

The fixture parameter is std::tuple<MarkerType, bool>, but these values have the distinct MarkerTypeXConf enum type. Google Test's combined generator therefore produces a tuple that cannot be converted to the fixture's parameter type, preventing profilexconf_gtest.bin from compiling. Explicitly cast both values to MarkerType, as the existing XConf tests do when assigning these constants to EventMarker::mType.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Code Coverage Summary

                                         |Lines       |Functions  |Branches    
Filename                                  |Rate     Num|Rate    Num|Rate     Num
================================================================================
[/mnt/L1_CONTAINER_SHARED_VOLUME/source/]
bulkdata/datamodel.c                      |72.5%    218|88.9%     9|    -      0
bulkdata/profile.c                        |31.9%   1132|76.5%    34|    -      0
bulkdata/profilexconf.c                   |49.4%    530|85.0%    20|    -      0
bulkdata/reportprofiles.c                 |57.5%    586| 100%    27|    -      0
bulkdata/t2eventreceiver.c                |64.1%    301| 100%    10|    -      0
bulkdata/t2markers.c                      |80.5%    169|83.3%    12|    -      0
ccspinterface/busInterface.c              |86.8%     53|85.7%     7|    -      0
ccspinterface/rbusInterface.c             |74.3%    946|97.2%    36|    -      0
commonlib/telemetry_busmessage_sender.c   |40.4%    396|84.2%    19|    -      0
dcautil/dca.c                             |73.0%    690| 100%    20|    -      0
dcautil/dcaproc.c                         |84.3%    230| 100%     7|    -      0
dcautil/dcautil.c                         |78.9%    185| 100%     6|    -      0
dcautil/legacyutils.c                     |79.0%    105| 100%     7|    -      0
privacycontrol/rdkservices_privacyutils.c | 100%     11| 100%     2|    -      0
protocol/http/curlinterface.c             | 100%     24| 100%     3|    -      0
protocol/http/multicurlinterface.c        |57.1%    431|83.3%    12|    -      0
protocol/rbusMethod/rbusmethodinterface.c |60.0%    105|50.0%     6|    -      0
reportgen/reportgen.c                     |56.6%    930| 100%    22|    -      0
scheduler/scheduler.c                     |70.2%    413| 100%    13|    -      0
t2parser/t2parser.c                       |59.4%   1939|88.5%    26|    -      0
t2parser/t2parserxconf.c                  |89.7%    195| 100%     3|    -      0
utils/persistence.c                       |78.7%    253| 100%    10|    -      0
utils/t2MtlsUtils.c                       |82.6%     46|75.0%     4|    -      0
utils/t2collection.c                      |89.6%    201| 100%    18|    -      0
utils/t2common.c                          |63.8%    185|73.3%    15|    -      0
utils/t2log_wrapper.c                     |69.2%     26|50.0%     2|    -      0
utils/vector.c                            |94.9%     79| 100%     8|    -      0
================================================================================
                                   Total:|61.6%  10379|90.8%   358|    -      0

Copilot AI balanced review requested due to automatic review settings November 3, 2026 22:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the marker-filtering and empty-value handling changes.

1 open issue
1 resolved since last review

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Code Coverage Summary

                                         |Lines       |Functions  |Branches    
Filename                                  |Rate     Num|Rate    Num|Rate     Num
================================================================================
[/mnt/L1_CONTAINER_SHARED_VOLUME/source/]
bulkdata/datamodel.c                      |72.5%    218|88.9%     9|    -      0
bulkdata/profile.c                        |31.9%   1132|76.5%    34|    -      0
bulkdata/profilexconf.c                   |49.4%    530|85.0%    20|    -      0
bulkdata/reportprofiles.c                 |57.5%    586| 100%    27|    -      0
bulkdata/t2eventreceiver.c                |64.1%    301| 100%    10|    -      0
bulkdata/t2markers.c                      |80.5%    169|83.3%    12|    -      0
ccspinterface/busInterface.c              |86.8%     53|85.7%     7|    -      0
ccspinterface/rbusInterface.c             |74.3%    946|97.2%    36|    -      0
commonlib/telemetry_busmessage_sender.c   |40.4%    396|84.2%    19|    -      0
dcautil/dca.c                             |73.0%    690| 100%    20|    -      0
dcautil/dcaproc.c                         |84.3%    230| 100%     7|    -      0
dcautil/dcautil.c                         |78.9%    185| 100%     6|    -      0
dcautil/legacyutils.c                     |79.0%    105| 100%     7|    -      0
privacycontrol/rdkservices_privacyutils.c | 100%     11| 100%     2|    -      0
protocol/http/curlinterface.c             | 100%     24| 100%     3|    -      0
protocol/http/multicurlinterface.c        |57.1%    431|83.3%    12|    -      0
protocol/rbusMethod/rbusmethodinterface.c |60.0%    105|50.0%     6|    -      0
reportgen/reportgen.c                     |56.6%    931| 100%    22|    -      0
scheduler/scheduler.c                     |70.2%    413| 100%    13|    -      0
t2parser/t2parser.c                       |59.4%   1939|88.5%    26|    -      0
t2parser/t2parserxconf.c                  |89.7%    195| 100%     3|    -      0
utils/persistence.c                       |78.7%    253| 100%    10|    -      0
utils/t2MtlsUtils.c                       |82.6%     46|75.0%     4|    -      0
utils/t2collection.c                      |89.6%    201| 100%    18|    -      0
utils/t2common.c                          |63.8%    185|73.3%    15|    -      0
utils/t2log_wrapper.c                     |69.2%     26|50.0%     2|    -      0
utils/vector.c                            |94.9%     79| 100%     8|    -      0
================================================================================
                                   Total:|61.6%  10380|90.8%   358|    -      0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants