Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source/reportgen/reportgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Comment on lines +42 to 47
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

checkForEmptyString() now treats the string "0" as empty, but the existing unit test for this helper (in source/test/reportgen/reportgenTest.cpp, TEST(CheckForEmptyString, AllBranchesAreCovered)) does not cover the new branch. Please add a test case asserting that "0" returns true to prevent regressions.

Copilot uses AI. Check for mistakes.
}
else
Expand Down
18 changes: 10 additions & 8 deletions test/functional-tests/tests/test_xconf_communications.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def test_xconf_retry_for_connection_errors():
ERROR_MSG = "Waiting for 180 sec before trying fetchRemoteConfiguration, No.of tries"
assert ERROR_MSG in grep_T2logs(ERROR_MSG)

pytest.mark.run(order=14)
pytest.mark.run(order=15)
def test_xconf_datamodel():
Comment on lines +173 to 174
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

pytest.mark.run(...) is missing the @ decorator prefix here, so the mark is never applied (it just evaluates an unused expression at import time). This likely breaks the intended ordered execution for this test.

Copilot uses AI. Check for mistakes.
kill_telemetry(9)
RUN_START_TIME = dt.now()
Expand All @@ -187,16 +187,18 @@ def test_xconf_datamodel():
kill_telemetry(29)
sleep(5)
assert "IUI_accum" in grep_T2logs("cJSON Report")
assert "Test_datamodel_1" in grep_T2logs("cJSON Report")
rbus_set_data("Device.DeviceInfo.X_RDKCENTRAL-COM.IUI.Version", "string", "0.1")
sleep(2)
kill_telemetry(29)
sleep(5)
kill_telemetry(29)
sleep(5)
sleep(7)
assert "IUI_accum\":\"0.1" in grep_T2logs("cJSON Report")
rbus_set_data("Device.DeviceInfo.X_RDKCENTRAL-COM.IUI.Version", "string", "0")
sleep(2)
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

This negative assertion will almost always fail because the same test previously asserted that an earlier report contained IUI_accum, and grep_T2logs() returns all matching lines from the entire log file (it does not scope to the latest report). Clear the log (or extract/assert only the last cJSON Report) before checking that IUI_accum is absent after setting the value to "0".

Suggested change
sleep(2)
sleep(2)
clear_T2logs()

Copilot uses AI. Check for mistakes.
kill_telemetry(29)
sleep(5)
assert "Test_datamodel_1" in grep_T2logs("cJSON Report")
sleep(10)
assert "IUI_accum" not in grep_T2logs("cJSON Report")

pytest.mark.run(order=15)
pytest.mark.run(order=14)
def test_xconf_split_markers():
Comment on lines +201 to 202
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

pytest.mark.run(...) is missing the @ decorator prefix here, so the mark is never applied and test ordering will not follow the configured order value.

Copilot uses AI. Check for mistakes.
kill_telemetry(9)
RUN_START_TIME = dt.now()
Expand Down
Loading