From 6a45d715a4fe5eed9445dcbcbdd61900aefd4256 Mon Sep 17 00:00:00 2001 From: PriyaDharshini_Kathiravan Date: Tue, 3 Feb 2026 07:30:11 +0000 Subject: [PATCH 1/2] Datamodel markers should ignore marker value as zero Signed-off-by: PriyaDharshini_Kathiravan --- source/reportgen/reportgen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/reportgen/reportgen.c b/source/reportgen/reportgen.c index 40ced998..77c7c668 100644 --- a/source/reportgen/reportgen.c +++ b/source/reportgen/reportgen.c @@ -39,9 +39,11 @@ static bool checkForEmptyString( char* valueString ) { // rbusInterface implementation explicitly adds string as "NULL" for parameters which doesn't exist on device // Consider "NULL" string value as qualified for empty string - if(strlen(valueString) < 1 || !strncmp(valueString, " ", 1) || !strncmp(valueString, "NULL", 4)) + // If the string has zero value it should be ignored + if(strlen(valueString) < 1 || !strncmp(valueString, " ", 1) || !strncmp(valueString, "0", 1) || !strncmp(valueString, "NULL", 4)) { isEmpty = true ; + T2Debug("Marker Value is empty or zero or NULL\n"); } } else From 09e620a4637c7928e8916d504b393c25bbaf0c13 Mon Sep 17 00:00:00 2001 From: PriyaDharshini_Kathiravan Date: Tue, 3 Feb 2026 07:30:11 +0000 Subject: [PATCH 2/2] Datamodel markers should ignore marker value as zero Signed-off-by: PriyaDharshini_Kathiravan --- source/reportgen/reportgen.c | 4 +++- test/functional-tests/tests/test_xconf_communications.py | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/reportgen/reportgen.c b/source/reportgen/reportgen.c index 40ced998..4ed6262f 100644 --- a/source/reportgen/reportgen.c +++ b/source/reportgen/reportgen.c @@ -39,9 +39,11 @@ static bool checkForEmptyString( char* valueString ) { // rbusInterface implementation explicitly adds string as "NULL" for parameters which doesn't exist on device // Consider "NULL" string value as qualified for empty string - if(strlen(valueString) < 1 || !strncmp(valueString, " ", 1) || !strncmp(valueString, "NULL", 4)) + // If the string has zero value it should be ignored + if(strlen(valueString) < 1 || !strncmp(valueString, " ", 1) || !strcmp(valueString, "0") || !strncmp(valueString, "NULL", 4)) { isEmpty = true ; + T2Debug("Marker Value is empty or zero or NULL\n"); } } else diff --git a/test/functional-tests/tests/test_xconf_communications.py b/test/functional-tests/tests/test_xconf_communications.py index 99a10522..4ac5e8ae 100644 --- a/test/functional-tests/tests/test_xconf_communications.py +++ b/test/functional-tests/tests/test_xconf_communications.py @@ -190,10 +190,14 @@ def test_xconf_datamodel(): assert "Test_datamodel_1" in grep_T2logs("cJSON Report") kill_telemetry(29) sleep(5) + rbus_set_data("Device.DeviceInfo.X_RDKCENTRAL-COM.IUI.Version", "string", "0.1") kill_telemetry(29) sleep(5) + assert "IUI_accum" in grep_T2logs("cJSON Report") + rbus_set_data("Device.DeviceInfo.X_RDKCENTRAL-COM.IUI.Version", "string", "0") kill_telemetry(29) sleep(5) + assert "IUI_accum" not in grep_T2logs("cJSON Report") assert "Test_datamodel_1" in grep_T2logs("cJSON Report") pytest.mark.run(order=15)