You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RDKB-67395: Data model and event-based marker with whitespace value a… - #457
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>
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.
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.
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.
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.
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.
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
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: 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