Skip to content

Rebase - #140

Open
Abhinavpv28 wants to merge 61 commits into
feature/tr69_testfrom
develop
Open

Rebase#140
Abhinavpv28 wants to merge 61 commits into
feature/tr69_testfrom
develop

Conversation

@Abhinavpv28

Copy link
Copy Markdown
Contributor

No description provided.

Abhinavpv28 and others added 14 commits May 5, 2025 15:49
…ic Updates (#117)

* Update rrdInterface.c

* Update rrdInterface.c

* Update rrdInterface.c

* Update cov_build.sh

* Update configure.ac

* Update rrdInterface.c

* Update rrdInterface.h

* Update cov_build.sh

* Update rrdInterface.c

* Update rrdInterface.h

* Update rrdInterface.c

---------

Co-authored-by: nhanasi <navihansi@gmail.com>
…method (#123)

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdCommon.h

* Update rrdIarmEvents.c

* Update rrdInterface.h

* Update rrdCommon.h

* Update rrdRunCmdThread.c

* Update rrdRunCmdThread.c

* Update rrdRunCmdThread.c

* Update rrdDynamic.c

* Update rrdJsonParser.c

* Update rrdCommon.h

* Update rrdIarmEvents.c

* Update rrdInterface.h

* Update rrdInterface.h

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdRunCmdThread.c

* Update rrdRunCmdThread.c

* Update rrdRunCmdThread.c

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdJsonParser.c

* Update rrdEventProcess.c

* Update rrdJsonParser.c

* Update rrdJsonParser.c

* Update rrdJsonParser.c

* Update rrdEventProcess.c

* Update rrdCommon.h

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c

* Update rrdIarmEvents.c
…method (#125)

* Update rrdIarmEvents.c

* Update rrdInterface.c

* Update rrdInterface.c

* Update cov_build.sh

* Update rrdIarmEvents.c

---------

Co-authored-by: nhanasi <navihansi@gmail.com>
…d message type (SCXI11BEI) (#121)

* Update rrdJsonParser.c

* Update rrdJsonParser.c

* Update rrdEventProcess.c

* Update rrdInterface.c

* Update rrdInterface.c

* Update rrdInterface.c

* Update rrdJsonParser.c

* Update rrdInterface.c

* Update rrdJsonParser.c

* Update rrdEventProcess.c

* Update rrdJsonParser.c

* Update rrdEventProcess.c

* Update rrdEventProcess.c

* Update rrdInterface.c

* Update rrdInterface.c

---------

Co-authored-by: nhanasi <navihansi@gmail.com>
Added release to fix remotedebugger bug fixes
… process exited with error code." (#134)

* Update rrdRunCmdThread.c

* Update rrdRunCmdThread.c

* Update rrdRunCmdThread.c

* Update rrdRunCmdThread.c

* Update rrdRunCmdThread.c
…rogress (#136)

* Update rrdInterface.c

* Update rrdInterface.c

* Update rrdInterface.c
Release 1.2.8 tag for RRD
@Abhinavpv28
Abhinavpv28 requested a review from a team as a code owner July 1, 2025 05:28
@Abhinavpv28
Abhinavpv28 requested a review from a team July 1, 2025 05:28
@CLAassistant

CLAassistant commented Jul 1, 2025

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
5 out of 6 committers have signed the CLA.

✅ AravindanNC
✅ nhanasi
✅ Abhinavpv28
✅ Alan-Ryan
✅ venkat0557
❌ naveenkumarhanasi
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Abhinavpv28 and others added 12 commits July 30, 2025 13:18
* Update Client_Mock.cpp

* Update Client_Mock.h

* Update rrdUnitTestRunner.cpp

* Update rrdUnitTestRunner.cpp

* Update rrdUnitTestRunner.cpp

* Update rrdInterface.c

* Update rrdInterface.h

* Update rrdRunCmdThread.c

* Update rrdIarmEvents.c

* Update rrdInterface.h

* Update rrdDynamic.c

* Update code-coverage.yml
Create deepsleep_main.c

Update Makefile

Create power_controller.h

Update run_l2.sh

Update cov_build.sh

Create pwrMgr.h

Update cov_build.sh

Update cov_build.sh

Update Makefile

Rename deepsleep_main.c to main.c

Update Makefile

update Makefile

Delete test/functional-tests/tests/rrdIarmEvents.c

Update run_l2.sh

Update remote_debugger.json

Update remote_debugger.json

Create test_deepsleep_static.py

Update run_l2.sh

Update run_l2.sh

Create test_deepsleep_dynamic.py

Update run_l2.sh

Update rrdInterface.c

Update create_json.sh

Create test_append.py

Create test_category.py

Update test_rrd_dynamic_profile_missing_report.py

Create test_rrd_dynamic_with_download_harmful.py

Create test_rrd_negative.py

Update configure.ac

Update cov_build.sh

Update run_l2.sh

Update main.c

Rename main.c to deepsleep_main.c

Update Makefile

Create rrd_append_report.feature

Create rrd_deepsleep_static.feature

Create rrd_deepsleep_dynamic.feature

Create rrd_dynamic_with_download_harmful_report.feature

Update rrd_dynamic_profile_missing_report.feature

Update test_rrd_dynamic_profile_missing_report.py

Update cov_build.sh

Update test_rrd_single_instance.py

Update test_category.py

Update run_l2.sh

Update test_rrd_dynamic_profile_missing_report.py

Update rrdInterface.c

Update rrdInterface.c

Update rrdInterface.c

Update rrdIarmEvents.c

Update rrdIarmEvents.c

Delete test/functional-tests/tests/test_deepsleep_dynamic.py

Delete test/functional-tests/tests/test_rrd_negative.py

Update run_l2.sh

Update test_category.py

Update cov_build.sh

Update configure.ac

Update configure.ac

Delete test/functional-tests/features/rrd_deepsleep_dynamic.feature

Update rrd_dynamic_profile_missing_report.feature

Update rrd_dynamic_profile_missing_report.feature

Delete test/functional-tests/tests/test_rrd_dynamic_with_download_harmful.py

Delete test/functional-tests/tests/deepsleep_main.c

Delete test/functional-tests/tests/Makefile

Update run_l2.sh

Update run_l2.sh

Delete test/functional-tests/features/rrd_dynamic_with_download_harmful_report.feature

Create rrd_dynamic_profile_subcategory_report.feature

Update run_l2.sh

Rename test_append.py to test_rrd_append_report.py

Rename test_category.py to test_rrd_dynamic_subcategory_report.py

Rename test_deepsleep_static.py to test_rrd_deepsleep_static_report.py

Rename rrd_deepsleep_static.feature to rrd_deepsleep_static_report.feature

Update rrd_dynamic_profile_missing_report.feature

Update rrd_dynamic_profile_missing_report.feature

Update rrd_dynamic_profile_missing_report.feature
RDK-56291 - [RDKE] Increase L2 Test Coverage For Remote Debugger : Target 80% [ Phase 2 ]
Deploy fossid_integration_stateless_diffscan_target_repo action
…rget 80% [ Phase 2 ] (#157)

* Update rrdInterface.c

* Update rrdIarmEvents.c

* Update configure.ac

* Update cov_build.sh

* Update remote_debugger.json

* Update create_json.sh

* Create Makefile

* Create deepsleep_main.c

---------

Co-authored-by: nhanasi <navihansi@gmail.com>
naveenkumarhanasi and others added 3 commits May 14, 2026 14:25
RRD release 1.3.4 for UUID fix
Create test_rrd_static_profile_report_with_suffix_negative_case.py

Potential fix for pull request finding



RRD 1.3.4 release changelog updates

Fix dynamic subcategory service log assertions for timestamped names

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/f0806557-f409-45cc-8993-700be01b59f2



Remove accidental pycache artifact from test changes

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/f0806557-f409-45cc-8993-700be01b59f2



Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_c_api_upload.py

Update test_rrd_debug_report_upload.py

Update test_rrd_deepsleep_static_report.py

Update test_rrd_dynamic_profile_report.py

Update test_rrd_static_profile_category_report.py

Update test_rrd_static_profile_report.py

Update test_rrd_static_profile_report_with_suffix.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_dynamic_profile_missing_report.py

Strengthen service-start assertions for timestamped runtime names

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4



Add helper docstring for service-start success assertion

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4



Improve helper docstring with Args and Raises

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4



Refine service-start helper naming and assertion messages

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4



Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_dynamic_profile_missing_report.py

Add feature files for static suffix report scenarios

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/59dfaf33-25ef-48a2-9549-dd1f571a3b55



L2

Potential fix for pull request finding



Update test_rrd_static_profile_report_with_suffix.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Fix service check in negative test case

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Stabilize remotedebugger startup in missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239



Remove accidental pycache artifact from PR

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239



Replace startup retry magic numbers with constants

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239



Remove accidental pycache artifact again

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239



Refine remotedebugger PID retry logic in missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239



Simplify startup PID retry loop for missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239
Copilot AI review requested due to automatic review settings May 19, 2026 14:25

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.

Pull request overview

Copilot reviewed 88 out of 89 changed files in this pull request and generated 10 comments.

Comment on lines +56 to +100
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "all" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli set 'all' failed: {stderr}"

time.sleep(2) # Allow processing time

print("Getting profile data after setting to 'all'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli get {get_param}')
print(f"Get command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli get failed: {stderr}"

if stdout:
try:
data = json.loads(stdout)
print(f"Parsed JSON data: {data}")
assert isinstance(data, (list, dict)), "Expected JSON array or object"
except json.JSONDecodeError:
print(f"Warning: Could not parse JSON response: {stdout}")

# Test Case 2: Set profile data to specific category
print("\nTest Case 2: Setting profile data to 'Device'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "Device" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli set 'Device' failed: {stderr}"

time.sleep(2) # Allow processing time

print("Getting profile data after setting to 'Device'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli get {get_param}')
print(f"Get command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli get failed: {stderr}"

if stdout:
try:
data = json.loads(stdout)
print(f"Parsed JSON data for Device: {data}")
assert isinstance(data, (list, dict)), "Expected JSON array or object"
except json.JSONDecodeError:
print(f"Warning: Could not parse JSON response: {stdout}")

# Test Case 3: Set profile data to another category
print("\nTest Case 3: Setting profile data to 'Process'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "Process" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli set 'Process' failed: {stderr}"
Comment on lines +79 to +86
if '.' in ISSUE_STRING:
ISSUE_NODE, ISSUE_SUBNODE = ISSUE_STRING.split('.')
else:
node = ISSUE_STRING
subnode = None

ISSUE_FOUND = f"Issue Data Node: {ISSUE_NODE} and Sub-Node: {ISSUE_SUBNODE} found in Static JSON File /etc/rrd/remote_debugger.json"

Comment on lines +100 to +101
issue_string = "DEEPSLEEP"
check_service_start_success("Audio.Audio")
Comment thread src/rrd_upload.c
Comment on lines +188 to +205
int rrd_upload_cleanup_source_dir(const char *dir_path) {
if (!dir_path) return -1;

RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "%s: Removing source directory: %s\n", __FUNCTION__, dir_path);

char cmd[1024];
snprintf(cmd, sizeof(cmd), "rm -rf %s", dir_path);

int ret = system(cmd);
if (ret == 0) {
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "%s: Successfully removed source directory: %s\n",
__FUNCTION__, dir_path);
return 0;
} else {
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "%s: Failed to remove source directory: %s (ret: %d)\n",
__FUNCTION__, dir_path, ret);
return -1;
}
Comment on lines +34 to +52
kill_rrd()
sleep(2)
command_to_get_pid = "pidof remotedebugger"
pid1 = run_shell_command(command_to_get_pid)
pid1 = run_shell_command(command_to_get_pid).strip().split()

if is_remotedebugger_running():
print("remotedebugger process is already running")
print(f"remotedebugger process is already running with PID(s): {pid1}")
else:
command_to_start = "nohup /usr/local/bin/remotedebugger > /dev/null 2>&1 &"
run_shell_silent(command_to_start)
sleep(2)
pid1 = run_shell_command(command_to_get_pid).strip().split()

pid2 = run_shell_command(command_to_get_pid)
assert pid1 == pid2, "A second instance of remotedebugger was started."
pid2 = run_shell_command(command_to_get_pid).strip().split()

# Assert only one PID exists (no second instance)
assert len(pid2) == 1, f"A second instance of remotedebugger was started: {pid2}"
# ensure it's the same PID as before
assert pid1[0] == pid2[0], f"PID changed unexpectedly: before={pid1}, after={pid2}"
Comment thread src/rrdRunCmdThread.c
Comment on lines +418 to +423
#if !defined(GTEST_ENABLE)
v_secure_system("systemctl stop %s", remoteDebuggerServiceStr);
v_secure_system("systemctl reset-failed %s", remoteDebuggerServiceStr);
free(cmdData->rfcvalue); // free rfcvalue received from RRDEventThreadFunc
free(cmdData->command); // free updated command info received from RRDEventThreadFunc
free(cmdData);
#endif
Comment thread src/rrdJsonParser.c
Comment on lines 807 to +809
}
free(rfcbuf); // free rfc value
// Note: rfcbuf is owned by the caller; this function must not free it.
// The caller is responsible for freeing rfcbuf after this function returns.
Comment thread src/rrdJsonParser.c
Comment on lines +696 to 705
if ((tar_name_len < 0) || ((size_t)tar_name_len >= sizeof(tarName)))
{
RDK_LOG(RDK_LOG_ERROR,LOG_REMDEBUG,"[%s:%d]: Failed to build upload file name for %s. snprintf result:%d, buffer size:%zu\n", __FUNCTION__,__LINE__,buff->mdata,tar_name_len,sizeof(tarName));
status = -1;
}
else
{
status = uploadDebugoutput(outdir, tarName);
}
if(status != 0)
Comment thread src/rrdRunCmdThread.c

/* Open debug_output.txt file*/
filePointer = fopen(finalOutFile, "a+");
filePointer = fopen(finalOutFile, "w+");
Comment thread CHANGELOG.md
Comment on lines +7 to +11
#### [1.3.4](https://github.com/rdkcentral/remote_debugger/compare/1.3.3...1.3.4)

- RDK-60236 : Remote Debugger Supports UUID Information in Debug Report File [`#194`](https://github.com/rdkcentral/remote_debugger/pull/194)
- Refactor issueTypeSplitter to include suffix handling [`c56fef3`](https://github.com/rdkcentral/remote_debugger/commit/c56fef33df07f47c2ea91c26010548bf0a3baa36)
- Merge tag '1.3.3' into develop [`7151d20`](https://github.com/rdkcentral/remote_debugger/commit/7151d208ced521de7ee7dee66cca6aea951e95b3)
… File (#199)

* Create rrd_uuid_support_implementation.HLD

* Rename rrd_uuid_support_implementation.HLD to rrd_uuid_support_implementation_HLD.md

* Update rrd_uuid_support_implementation_HLD.md

* Move docs from .github directory

---------

Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>
Co-authored-by: nhanasi <navihansi@gmail.com>
Copilot AI review requested due to automatic review settings May 19, 2026 14:45

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.

Pull request overview

Copilot reviewed 89 out of 90 changed files in this pull request and generated 18 comments.

Comments suppressed due to low confidence (1)

src/rrdRunCmdThread.c:423

  • Wrapping the free() calls for cmdData->rfcvalue, cmdData->command and cmdData itself in #if !defined(GTEST_ENABLE) means these allocations leak under the gtest build. If the intent was only to prevent double-free interactions with the mocked systemd path in tests, prefer freeing unconditionally and instead make the test harness not allocate ownership-transferring cmdData here, or guard only the systemd v_secure_system call. As written, gtest runs accumulate leaks that valgrind/CI coverage will report.

Comment on lines +56 to +98
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "all" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli set 'all' failed: {stderr}"

time.sleep(2) # Allow processing time

print("Getting profile data after setting to 'all'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli get {get_param}')
print(f"Get command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli get failed: {stderr}"

if stdout:
try:
data = json.loads(stdout)
print(f"Parsed JSON data: {data}")
assert isinstance(data, (list, dict)), "Expected JSON array or object"
except json.JSONDecodeError:
print(f"Warning: Could not parse JSON response: {stdout}")

# Test Case 2: Set profile data to specific category
print("\nTest Case 2: Setting profile data to 'Device'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "Device" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli set 'Device' failed: {stderr}"

time.sleep(2) # Allow processing time

print("Getting profile data after setting to 'Device'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli get {get_param}')
print(f"Get command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli get failed: {stderr}"

if stdout:
try:
data = json.loads(stdout)
print(f"Parsed JSON data for Device: {data}")
assert isinstance(data, (list, dict)), "Expected JSON array or object"
except json.JSONDecodeError:
print(f"Warning: Could not parse JSON response: {stdout}")

# Test Case 3: Set profile data to another category
print("\nTest Case 3: Setting profile data to 'Process'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "Process" {set_param}')
Comment on lines +80 to +86
if '.' in ISSUE_STRING:
ISSUE_NODE, ISSUE_SUBNODE = ISSUE_STRING.split('.')
else:
node = ISSUE_STRING
subnode = None

ISSUE_FOUND = f"Issue Data Node: {ISSUE_NODE} and Sub-Node: {ISSUE_SUBNODE} found in Static JSON File /etc/rrd/remote_debugger.json"
DEBUG_FILE = "Adding Details of Debug commands to Output File"
assert DEBUG_FILE in grep_rrdlogs(DEBUG_FILE)

issue_string = "DEEPSLEEP"
Comment thread src/rrdRunCmdThread.c
Comment on lines +417 to +423
RDK_LOG(RDK_LOG_INFO,LOG_REMDEBUG,"[%s:%d]: Stopping %s service...\n",__FUNCTION__,__LINE__,remoteDebuggerServiceStr);
#if !defined(GTEST_ENABLE)
v_secure_system("systemctl stop %s", remoteDebuggerServiceStr);
v_secure_system("systemctl reset-failed %s", remoteDebuggerServiceStr);
free(cmdData->rfcvalue); // free rfcvalue received from RRDEventThreadFunc
free(cmdData->command); // free updated command info received from RRDEventThreadFunc
free(cmdData);
#endif
Comment thread src/rrdIarmEvents.c
Comment on lines 154 to 185
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Received state from Power Manager Current :[%d] New[%d] \n", __FUNCTION__, __LINE__, currentState, newState);
#ifdef ENABLE_WEBCFG_FEATURE
rbusError_t rc = RBUS_ERROR_BUS_ERROR;
rbusValue_t value;
rbusValue_Init(&value);
rbusValue_SetString(value,"root");
rc = rbus_set(rrdRbusHandle, RRD_WEBCFG_FORCE_SYNC, value, NULL);
if (rc != RBUS_ERROR_SUCCESS)
#ifndef USE_L2_SUPPORT
if (rc != RBUS_ERROR_SUCCESS)
{
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "[%s:%d]: rbus_set failed for [%s] with error [%d]\n\n", __FUNCTION__, __LINE__,RRD_WEBCFG_FORCE_SYNC ,rc);
return;
}
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Invoking WebCfg Force Sync: %s... \n", __FUNCTION__, __LINE__, RRD_WEBCFG_FORCE_SYNC);
#else
#endif
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Invoking WebCfg Force Sync: %s... \n", __FUNCTION__, __LINE__, RRD_WEBCFG_FORCE_SYNC);
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Copying Message Received to the queue.. \n", __FUNCTION__, __LINE__);
sbuf = (data_buf *)malloc(sizeof(data_buf));
if (!sbuf)
{
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Memory Allocation Failed for EventId %d \n", __FUNCTION__, __LINE__, eventId);
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Memory Allocation Failed for EventId \n", __FUNCTION__, __LINE__);
return;
}

RRD_data_buff_init(sbuf, DEEPSLEEP_EVENT_MSG, RRD_DEEPSLEEP_RDM_DOWNLOAD_PKG_INITIATE);
sbuf->mdata = (char *)malloc(msgLen);
if (!sbuf->mdata)
{
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Memory Allocation Failed for EventId %d \n", __FUNCTION__, __LINE__, eventId);
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: Memory Allocation Failed for EventId \n", __FUNCTION__, __LINE__);
RRD_data_buff_deAlloc(sbuf);
return;
}
strncpy((char *)sbuf->mdata, (const char *)DEEP_SLEEP_STR, msgLen);
RRDMsgDeliver(msqid, sbuf);
Comment thread CHANGELOG.md
Comment on lines +7 to +12
#### [1.3.4](https://github.com/rdkcentral/remote_debugger/compare/1.3.3...1.3.4)

- RDK-60236 : Remote Debugger Supports UUID Information in Debug Report File [`#194`](https://github.com/rdkcentral/remote_debugger/pull/194)
- Refactor issueTypeSplitter to include suffix handling [`c56fef3`](https://github.com/rdkcentral/remote_debugger/commit/c56fef33df07f47c2ea91c26010548bf0a3baa36)
- Merge tag '1.3.3' into develop [`7151d20`](https://github.com/rdkcentral/remote_debugger/commit/7151d208ced521de7ee7dee66cca6aea951e95b3)

Comment on lines +79 to +85
if '.' in ISSUE_STRING:
ISSUE_NODE, ISSUE_SUBNODE = ISSUE_STRING.split('.')
else:
node = ISSUE_STRING
subnode = None

ISSUE_FOUND = f"Issue Data Node: {ISSUE_NODE} and Sub-Node: {ISSUE_SUBNODE} found in Static JSON File /etc/rrd/remote_debugger.json"
Comment thread src/Makefile.am
Comment on lines 1 to 3
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
And the issue data node and sub-node should be found in the JSON file
And the directory should be created to store the executed output
And Sanity check to validate the commands should be executed
And Command output shopuld be added to the output file
Comment on lines +147 to +152
SCRIPT_SUCCESS = "Debug Information Report upload Failed"
SCRIPT_FAILURE = "Debug Information Report upload Success"
if SCRIPT_SUCCESS in grep_rrdlogs(SCRIPT_SUCCESS):
print("Script execution success")
elif SCRIPT_FAILURE in grep_rrdlogs(SCRIPT_FAILURE):
print("Script execution failed")
nhanasi and others added 2 commits May 20, 2026 14:05
Co-authored-by: Hanasi <nhanas001c@cable.comcast.com>
fix: remove unclear inline note from static profile fallback path

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ddda5e68-d84d-4a89-ab64-02935f00a57f

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: plan length-validation update for static fallback

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: validate issue node length before installed-package fallback

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: clarify installed-package length guard semantics

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: align length-limit wording with validation semantics

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: improve fallback guard naming and failure logging

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

refactor: centralize issue length and fallback skip logging

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efaba2d2-7e7e-4927-bbe3-106dbb286e2b

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdEventProcess.c

Update rrdCommon.h

Update rrdDynamic.c

Refactor issueTypeSplitter to include suffix handling

Update rrdEventProcess.c

Update rrdExecuteScript.c

Refactor rrdEventProcess.h to rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdEventProcess.h

Update rrdExecuteScript.h

Update rrdJsonParser.c

Update rrdJsonParser.h

Update rrdInterface.c

Update rrdCommon.h

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix indentation for appendMode assignment

Update rrdCommon.h

Fix appendMode assignment in rrdEventProcess.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdExecuteScript.h

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Remove redundant logging from rrdJsonParser

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Fix heap overflow in issueTypeSplitter and memory leaks in suffix handling

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/fbc52780-966b-4912-825f-3030aa43c3e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

Delete .gitignore

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Add gtest test cases for split_issue_type

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove build artifacts, add .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Add explicit truncated content assertion in SuffixTruncatedWhenTooSmall test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Update rrdJsonParser.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Delete .gitignore

Delete src/unittest/UTJson/device.properties

Update rrdEventProcess.c

Add gtest tests for split_issue_type, suffix field, and processIssueTypeEvent

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/76cad72a-f67f-4c05-8fb5-bfadf0c173b3

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Delete .gitignore

Validate suffix prefix: only _Search- and _LogSearch- are allowed

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/125526c2-7b70-48f5-8bec-fd725eea8a04

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Base never contains underscore: split at first _ and discard invalid suffix

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/904bf10d-546b-4038-a60c-9bc76094a225

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix segfault in GTEST_ENABLE mode when rbuf->jsonPath is NULL

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove accidentally committed dummy directory and update .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix IssueTypeSplitterTest to match new issueTypeSplitter behavior (no built-in special-char removal)

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/00abcaba-8a41-4b88-ae12-07b5ff780ff9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix empty/whitespace IssueType bypassing processIssueTypeEvent guards

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/4de31e24-70d8-496c-ac6a-a5376771d936

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: preserve hyphens in archive filename so portal can parse it correctly

rrd_logproc_convert_issue_type() was converting '-' to '_', turning the
suffix '_Search-67768-67' into '_SEARCH_67768_67'. This added extra '_'
separators into the archive filename that broke the analytics portal's
filename parser — it could no longer identify the timestamp field, so
download requests used an incorrect S3 key.

Fix: keep '-' as '-' in the sanitized output. The archive filename now
uses '_' to separate structural fields (MAC, issueType, timestamp) and
'-' within the UUID suffix, giving the portal a reliable delimiter.

Also increase issue_type_sanitized buffer in uploadRRDLogs.c from 64 to
256 bytes so a full UUID suffix never causes a silent truncation failure.

Before: 04B86A12F9F8_DEVICE_DEVICEIP_SEARCH_67768_67_<timestamp>_RRD_DEBUG_LOGS.tgz
After:  04B86A12F9F8_DEVICE_DEVICEIP_SEARCH-67768-67_<timestamp>_RRD_DEBUG_LOGS.tgz

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/981b6bc1-c9d2-4150-9e9d-851004942ffc

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: replace _Search-/_LogSearch- prefix check with suffix length <= 9 rule

split_issue_type() now discards any suffix whose total length (including
the leading '_') exceeds 9 characters.  The old _Search-/_LogSearch-
prefix validation is removed entirely.

Rule:
  strlen(underscore) <= 9  → suffix accepted
  strlen(underscore)  > 9  → suffix discarded

This means:
  - Short session tokens (e.g. "_ab12345", 8 chars) are carried through
  - Long UUID-based suffixes like "_Search-b6877385-...) are discarded,
    preventing extra '_' delimiters from breaking the portal filename parser

Affected tests updated:
  - UnderscoreSplitsBaseAndSuffix : uses a short accepted suffix
  - MultipleUnderscoresSplitsAtFirst: "_def_ghi" (8 chars) now kept
  - BaseTruncatedWhenTooSmall / ExactFitBase: "_suffix" (7 chars) now kept
  - SuffixTruncatedWhenTooSmall: uses 9-char suffix with 5-byte buffer
  - OnlyUnderscoreInput: "_" (1 char) now kept
  - LogSearchSuffixIsValid → NineCharSuffixIsAccepted (boundary test)
  - SearchSuffixIsValid → LongSuffixIsDiscarded
  - InvalidSuffixPrefixDiscarded / SearchWithoutHyphenIsInvalid /
    LogSearchWithoutHyphenIsInvalid: updated comments (same outcomes)
  - ProcessIssueTypeEvntTest comments updated to reflect new rule

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

refactor: improve RRD_MAX_SUFFIX_LEN comment and rename length-based tests

- Expand the RRD_MAX_SUFFIX_LEN comment to explain why 9 chars is the limit
- Rename misleading test names that referenced old prefix-based validation:
    InvalidSuffixPrefixDiscarded → SuffixExceedingMaxLengthDiscarded
    SearchWithoutHyphenIsInvalid → SuffixSeventeenCharsDiscarded
    LogSearchWithoutHyphenIsInvalid → SuffixTwentyCharsDiscarded
- LongSuffixIsDiscarded: switch to a neutral _1234567890 example so the
  test does not imply any Search-specific behavior

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdJsonParser.c

Update uploadRRDLogs.c

Update uploadRRDLogs.c

Update rrdJsonParser.c

Delete .gitignore

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Update rrdEventProcess.c

sanitize split_issue_type suffix to [A-Za-z0-9_-] to prevent injection

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/72e164ed-ae53-4076-8fb1-5ff1e21375e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Delete .gitignore

Update rrdRunCmdThread.c

Update rrdRunCmdThread.h

Delete src/unittest/UTJson/device.properties

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdRunCmdThread.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdDynamic.c

RRD 1.3.4 release changelog updates

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

fix: harden profile length guard null checks and cleanup

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

chore: tighten strnlen boundary check and indentation

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: use bounded strnlen check and null freed issue pointers

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c9da16b1-8b0f-497a-aca2-ec47fae37e48

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Update rrdDynamic.c

Refactor issueTypeSplitter to include suffix handling

Update rrdEventProcess.c

Update rrdExecuteScript.c

Refactor rrdEventProcess.h to rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdExecuteScript.h

Update rrdEventProcess.h

Update rrdExecuteScript.h

Update rrdJsonParser.c

Update rrdJsonParser.h

Update rrdInterface.c

Update rrdCommon.h

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix indentation for appendMode assignment

Update rrdCommon.h

Fix appendMode assignment in rrdEventProcess.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdExecuteScript.h

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Update rrdExecuteScript.c

Remove redundant logging from rrdJsonParser

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Update rrdEventProcess.c

Update rrdJsonParser.c

Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Fix heap overflow in issueTypeSplitter and memory leaks in suffix handling

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/fbc52780-966b-4912-825f-3030aa43c3e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

Delete .gitignore

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Add gtest test cases for split_issue_type

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove build artifacts, add .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Add explicit truncated content assertion in SuffixTruncatedWhenTooSmall test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/9996d741-248e-4e58-8689-b4ba873cfaf2

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Update rrdEventProcess.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Update rrdJsonParser.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Delete .gitignore

Delete src/unittest/UTJson/device.properties

Update rrdEventProcess.c

Add gtest tests for split_issue_type, suffix field, and processIssueTypeEvent

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/76cad72a-f67f-4c05-8fb5-bfadf0c173b3

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Delete .gitignore

Validate suffix prefix: only _Search- and _LogSearch- are allowed

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/125526c2-7b70-48f5-8bec-fd725eea8a04

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Base never contains underscore: split at first _ and discard invalid suffix

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/904bf10d-546b-4038-a60c-9bc76094a225

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Update rrdUnitTestRunner.cpp

Update rrdEventProcess.c

Update rrdEventProcess.c

Fix segfault in GTEST_ENABLE mode when rbuf->jsonPath is NULL

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Remove accidentally committed dummy directory and update .gitignore

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/efdc0d6b-89e6-4423-b202-a900f5683839

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix IssueTypeSplitterTest to match new issueTypeSplitter behavior (no built-in special-char removal)

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/00abcaba-8a41-4b88-ae12-07b5ff780ff9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Fix empty/whitespace IssueType bypassing processIssueTypeEvent guards

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/4de31e24-70d8-496c-ac6a-a5376771d936

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: preserve hyphens in archive filename so portal can parse it correctly

rrd_logproc_convert_issue_type() was converting '-' to '_', turning the
suffix '_Search-67768-67' into '_SEARCH_67768_67'. This added extra '_'
separators into the archive filename that broke the analytics portal's
filename parser — it could no longer identify the timestamp field, so
download requests used an incorrect S3 key.

Fix: keep '-' as '-' in the sanitized output. The archive filename now
uses '_' to separate structural fields (MAC, issueType, timestamp) and
'-' within the UUID suffix, giving the portal a reliable delimiter.

Also increase issue_type_sanitized buffer in uploadRRDLogs.c from 64 to
256 bytes so a full UUID suffix never causes a silent truncation failure.

Before: 04B86A12F9F8_DEVICE_DEVICEIP_SEARCH_67768_67_<timestamp>_RRD_DEBUG_LOGS.tgz
After:  04B86A12F9F8_DEVICE_DEVICEIP_SEARCH-67768-67_<timestamp>_RRD_DEBUG_LOGS.tgz

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/981b6bc1-c9d2-4150-9e9d-851004942ffc

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

fix: replace _Search-/_LogSearch- prefix check with suffix length <= 9 rule

split_issue_type() now discards any suffix whose total length (including
the leading '_') exceeds 9 characters.  The old _Search-/_LogSearch-
prefix validation is removed entirely.

Rule:
  strlen(underscore) <= 9  → suffix accepted
  strlen(underscore)  > 9  → suffix discarded

This means:
  - Short session tokens (e.g. "_ab12345", 8 chars) are carried through
  - Long UUID-based suffixes like "_Search-b6877385-...) are discarded,
    preventing extra '_' delimiters from breaking the portal filename parser

Affected tests updated:
  - UnderscoreSplitsBaseAndSuffix : uses a short accepted suffix
  - MultipleUnderscoresSplitsAtFirst: "_def_ghi" (8 chars) now kept
  - BaseTruncatedWhenTooSmall / ExactFitBase: "_suffix" (7 chars) now kept
  - SuffixTruncatedWhenTooSmall: uses 9-char suffix with 5-byte buffer
  - OnlyUnderscoreInput: "_" (1 char) now kept
  - LogSearchSuffixIsValid → NineCharSuffixIsAccepted (boundary test)
  - SearchSuffixIsValid → LongSuffixIsDiscarded
  - InvalidSuffixPrefixDiscarded / SearchWithoutHyphenIsInvalid /
    LogSearchWithoutHyphenIsInvalid: updated comments (same outcomes)
  - ProcessIssueTypeEvntTest comments updated to reflect new rule

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

refactor: improve RRD_MAX_SUFFIX_LEN comment and rename length-based tests

- Expand the RRD_MAX_SUFFIX_LEN comment to explain why 9 chars is the limit
- Rename misleading test names that referenced old prefix-based validation:
    InvalidSuffixPrefixDiscarded → SuffixExceedingMaxLengthDiscarded
    SearchWithoutHyphenIsInvalid → SuffixSeventeenCharsDiscarded
    LogSearchWithoutHyphenIsInvalid → SuffixTwentyCharsDiscarded
- LongSuffixIsDiscarded: switch to a neutral _1234567890 example so the
  test does not imply any Search-specific behavior

All 331 tests pass.

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/c6d6fc29-da2a-46af-a417-c2de67a18448

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdJsonParser.c

Update uploadRRDLogs.c

Update uploadRRDLogs.c

Update rrdJsonParser.c

Delete .gitignore

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdEventProcess.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdJsonParser.c

Update rrdEventProcess.c

sanitize split_issue_type suffix to [A-Za-z0-9_-] to prevent injection

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/72e164ed-ae53-4076-8fb1-5ff1e21375e9

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>

Update rrdEventProcess.c

Delete .gitignore

Update rrdRunCmdThread.c

Update rrdRunCmdThread.h

Delete src/unittest/UTJson/device.properties

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdRunCmdThread.c

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

RRD 1.3.4 release changelog updates

Create test_rrd_static_profile_report_with_suffix.py (#201)

Create test_rrd_static_profile_report_with_suffix_negative_case.py

Potential fix for pull request finding

RRD 1.3.4 release changelog updates

Fix dynamic subcategory service log assertions for timestamped names

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/f0806557-f409-45cc-8993-700be01b59f2

Remove accidental pycache artifact from test changes

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/f0806557-f409-45cc-8993-700be01b59f2

Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_c_api_upload.py

Update test_rrd_debug_report_upload.py

Update test_rrd_deepsleep_static_report.py

Update test_rrd_dynamic_profile_report.py

Update test_rrd_static_profile_category_report.py

Update test_rrd_static_profile_report.py

Update test_rrd_static_profile_report_with_suffix.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_dynamic_profile_missing_report.py

Strengthen service-start assertions for timestamped runtime names

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4

Add helper docstring for service-start success assertion

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4

Improve helper docstring with Args and Raises

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4

Refine service-start helper naming and assertion messages

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/ec85a8af-7e00-4410-8ca2-4e20cd06cfd4

Update test_rrd_background_cmd_static_profile_report.py

Update test_rrd_dynamic_profile_missing_report.py

Add feature files for static suffix report scenarios

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/59dfaf33-25ef-48a2-9549-dd1f571a3b55

L2

Potential fix for pull request finding

Update test_rrd_static_profile_report_with_suffix.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Fix service check in negative test case

Update test_rrd_static_profile_report_with_suffix_negative_case.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Update test_rrd_dynamic_profile_missing_report.py

Stabilize remotedebugger startup in missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Remove accidental pycache artifact from PR

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Replace startup retry magic numbers with constants

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Remove accidental pycache artifact again

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Refine remotedebugger PID retry logic in missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

Simplify startup PID retry loop for missing-profile test

Agent-Logs-Url: https://github.com/rdkcentral/remote_debugger/sessions/eafe5a9f-2bbc-448a-966f-61c3067b7239

RDK-60236 : Remote Debugger Supports UUID Information in Debug Report File (#199)

* Create rrd_uuid_support_implementation.HLD

* Rename rrd_uuid_support_implementation.HLD to rrd_uuid_support_implementation_HLD.md

* Update rrd_uuid_support_implementation_HLD.md

* Move docs from .github directory

---------

Co-authored-by: Abhinav P V <Abhinav_Valappil@comcast.com>
Co-authored-by: nhanasi <navihansi@gmail.com>

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Update rrdUnitTestRunner.cpp

Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Update rrdUnitTestRunner.cpp

L2 Document update (#207)

Co-authored-by: Hanasi <nhanas001c@cable.comcast.com>

Create rrd_dynamic_profile_rdm_node_length_exceeded.feature

Create test_dynamic_profile_rdm_node_length_exceeded.py

Create rrd_issuetype_exceeds_max_length.feature

Delete test/functional-tests/tests/rrd_dynamic_profile_rdm_node_length_exceeded.feature

L2
Copilot AI review requested due to automatic review settings May 26, 2026 17:22

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.

Pull request overview

Copilot reviewed 93 out of 94 changed files in this pull request and generated 12 comments.

Comment on lines +48 to +71
command = [
'rbuscli', 'set',
'Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType',
'string', 'Device.Info_ab1bghjh'
]
result = subprocess.run(command, capture_output=True, text=True)
assert result.returncode == 0, f"Command failed with error: {result.stderr}"

sleep(15)

QUERY_MSG = "Received event for RRD_SET_ISSUE_EVENT"
assert QUERY_MSG in grep_rrdlogs(QUERY_MSG)

MSG_SEND = "SUCCESS: Message sending Done"
sleep(2)
assert MSG_SEND in grep_rrdlogs(MSG_SEND)

MSG_RECEIVE = "SUCCESS: Message Reception Done"
sleep(2)
assert MSG_RECEIVE in grep_rrdlogs(MSG_RECEIVE)

ISSUE_MSG = f'MSG={ISSUE_STRING}'
assert ISSUE_MSG in grep_rrdlogs(ISSUE_MSG)
print("Sent and received messages are found and match in the logfile")
Comment on lines +45 to +58
# RBUS parameter names - exactly as defined in the HLD
set_param = "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.setProfileData"
get_param = "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.getProfileData"

def run_rbuscli_cmd(cmd):
"""Execute rbuscli command and return result."""
result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30)
return result.stdout.strip(), result.stderr.strip(), result.returncode

# Test Case 1: Set profile data to "all" and get all categories
print("Test Case 1: Setting profile data to 'all'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "all" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli set 'all' failed: {stderr}"
Comment thread run_l2.sh
Comment on lines 32 to +34
touch /media/apps/RDK-RRD-Test/etc/rrd/remote_debugger.json
echo "AA:BB:CC:DD:EE:FF" >> /tmp/.estb_mac

Comment thread cov_build.sh
Comment on lines 43 to +54
if [ ! -d tr69hostif ]; then
git clone https://github.com/rdkcentral/tr69hostif.git
fi
git clone https://github.com/rdkcentral/dcm-agent.git -b develop

cd dcm-agent
sh cov_build.sh
autoreconf -i
./configure
make && make install
cp uploadstblogs/include/*.h /usr/local/include
cd -
Comment thread configure.ac
Comment on lines +65 to +77
AC_ARG_ENABLE([L2support],
AS_HELP_STRING([--enable-L2support],[enable L2support (default is no)]),
[
case "${enableval}" in
yes) L2_SUPPORT_ENABLE=true
L2_SUPPORT_FLAG="-DUSE_L2_SUPPORT"
m4_if(m4_sysval,[0],[SUBDIRS_L2_SUPPORT="src"]) ;;
no) L2_SUPPORT_ENABLE=false AC_MSG_ERROR([L2_SUPPORT is disabled]) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-L2support]) ;;
esac
],
[echo "L2support is disabled"])

Comment thread src/rrdDynamic.c
Comment on lines +289 to +294
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "[%s:%d]: Invalid profile length, skipping download request\n", __FUNCTION__, __LINE__);
}
free(pissueStructNode->Node);
free(pissueStructNode->subNode);
pissueStructNode->Node = NULL;
pissueStructNode->subNode = NULL;
Comment thread src/unittest/Makefile.am
Comment on lines 24 to 29
# Define the libraries to link against
COMMON_LDADD = -lgtest -lgtest_main -lgmock_main -lgmock -lcjson -lmsgpackc -lgcov
COMMON_LDADD = -lgtest -lgtest_main -lgmock_main -lgmock -lcjson -lmsgpackc -lgcov -lz

# Define the compiler flags
COMMON_CXXFLAGS = -frtti -fprofile-arcs -ftest-coverage
COMMON_CXXFLAGS = -frtti -fprofile-arcs -ftest-coverage -fpermissive

Comment thread src/rrd_sysinfo.c
Comment on lines +66 to +72
memset(timestamp, 0, size);
time_t now = time(NULL);
struct tm *tm_info = localtime(&now);
if (!tm_info) {
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "%s: Failed to get local time\n", __FUNCTION__);
return -1;
}
Comment thread src/rrd_sysinfo.h
Comment on lines +37 to +42
/* Get the device MAC address.
* @param mac_addr Buffer to store MAC address (min 18 bytes)
* @param size Size of buffer
* @return 0 on success, -1 on error
*/
int rrd_sysinfo_get_mac_address(char *mac_addr, size_t size);
Comment thread src/rrd_logproc.c
Comment on lines +96 to +126
// Convert issue type to uppercase and sanitize (alnum/underscore only)
int rrd_logproc_convert_issue_type(const char *input, char *output, size_t size) {
if (!input) {
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "%s: NULL input\n", __FUNCTION__);
return -1;
}
if (!output) {
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "%s: NULL output buffer\n", __FUNCTION__);
return -1;
}
if (size == 0) {
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "%s: Zero buffer size\n", __FUNCTION__);
return -1;
}

size_t len = strlen(input);
if (len >= size) {
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "%s: Buffer too small (need: %zu, have: %zu)\n",
__FUNCTION__, len + 1, size);
return -1; // Buffer too small
}

RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "%s: Converting issue type: %s\n", __FUNCTION__, input);

size_t j = 0;
for (size_t i = 0; input[i] && j < size-1; ++i) {
char c = input[i];
if (isalnum((unsigned char)c)) output[j++] = toupper((unsigned char)c);
else if (c == '_' || c == '.') output[j++] = '_';
else if (c == '-') output[j++] = '-'; // preserve hyphens so suffix UUID tokens remain distinct
// skip other chars
nhanasi added 2 commits May 29, 2026 09:33
* Rename test/functional-tests/L2_Test_Coverage.md to test/functional-tests/docs/L2_Test_Coverage.md

* Create L1_Test_Coverage.md
* Update L2_Test_Coverage.md

* Update L2_Test_Coverage.md
Copilot AI review requested due to automatic review settings June 9, 2026 16:50

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.

Pull request overview

Copilot reviewed 94 out of 95 changed files in this pull request and generated 12 comments.

Comment thread src/rrdRunCmdThread.c
Comment on lines +417 to 421
RDK_LOG(RDK_LOG_INFO,LOG_REMDEBUG,"[%s:%d]: Stopping %s service...\n",__FUNCTION__,__LINE__,remoteDebuggerServiceStr);
#if !defined(GTEST_ENABLE)
v_secure_system("systemctl stop %s", remoteDebuggerServiceStr);
v_secure_system("systemctl reset-failed %s", remoteDebuggerServiceStr);
free(cmdData->rfcvalue); // free rfcvalue received from RRDEventThreadFunc
free(cmdData->command); // free updated command info received from RRDEventThreadFunc
Comment thread src/rrdDynamic.c
boundedNodeLen = strnlen(pissueStructNode->Node, RRD_DYNAMIC_PROFILE_MAX_LENGTH + 1);
if (boundedNodeLen > RRD_DYNAMIC_PROFILE_MAX_LENGTH)
{
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "[%s:%d]: Issue node length must be less than %d\n", __FUNCTION__, __LINE__, RRD_DYNAMIC_PROFILE_MAX_LENGTH);
Comment on lines +46 to +70
reset_issuetype_rfc()
sleep(10)
command = [
'rbuscli', 'set',
'Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType',
'string', 'Device.Info_ab1bghjh'
]
result = subprocess.run(command, capture_output=True, text=True)
assert result.returncode == 0, f"Command failed with error: {result.stderr}"

sleep(15)

QUERY_MSG = "Received event for RRD_SET_ISSUE_EVENT"
assert QUERY_MSG in grep_rrdlogs(QUERY_MSG)

MSG_SEND = "SUCCESS: Message sending Done"
sleep(2)
assert MSG_SEND in grep_rrdlogs(MSG_SEND)

MSG_RECEIVE = "SUCCESS: Message Reception Done"
sleep(2)
assert MSG_RECEIVE in grep_rrdlogs(MSG_RECEIVE)

ISSUE_MSG = f'MSG={ISSUE_STRING}'
assert ISSUE_MSG in grep_rrdlogs(ISSUE_MSG)
Comment on lines +79 to +84
if '.' in ISSUE_STRING:
ISSUE_NODE, ISSUE_SUBNODE = ISSUE_STRING.split('.')
else:
node = ISSUE_STRING
subnode = None

Comment on lines +96 to +100
check_service_start_success(ISSUE_STRING)

JOURNAL_START = f"journalctl remote_debugger_{ISSUE_STRING}"
assert JOURNAL_START in grep_rrdlogs(JOURNAL_START)

Comment thread remote_debugger.json
}
}
},
"DeepSleep": {

# Test Case 1: Set profile data to "all" and get all categories
print("Test Case 1: Setting profile data to 'all'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "all" {set_param}')
Comment thread src/unittest/Makefile.am
Comment on lines 27 to 29
# Define the compiler flags
COMMON_CXXFLAGS = -frtti -fprofile-arcs -ftest-coverage
COMMON_CXXFLAGS = -frtti -fprofile-arcs -ftest-coverage -fpermissive

Comment thread configure.ac
Comment on lines +65 to +76
AC_ARG_ENABLE([L2support],
AS_HELP_STRING([--enable-L2support],[enable L2support (default is no)]),
[
case "${enableval}" in
yes) L2_SUPPORT_ENABLE=true
L2_SUPPORT_FLAG="-DUSE_L2_SUPPORT"
m4_if(m4_sysval,[0],[SUBDIRS_L2_SUPPORT="src"]) ;;
no) L2_SUPPORT_ENABLE=false AC_MSG_ERROR([L2_SUPPORT is disabled]) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-L2support]) ;;
esac
],
[echo "L2support is disabled"])
Comment on lines +132 to +134
remove_logfile()
remove_outdir_contents(OUTPUT_DIR)
kill_rrd()
…is leading RDM crash (#211)

* Update rrd_config.c

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update rrd_config.c

* Update rrd_config.c

* Update rrd_config.c

* Update rrd_config.c

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 10, 2026 19:08

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.

Pull request overview

Copilot reviewed 94 out of 95 changed files in this pull request and generated 11 comments.

Comment on lines +48 to +71
command = [
'rbuscli', 'set',
'Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType',
'string', 'Device.Info_ab1bghjh'
]
result = subprocess.run(command, capture_output=True, text=True)
assert result.returncode == 0, f"Command failed with error: {result.stderr}"

sleep(15)

QUERY_MSG = "Received event for RRD_SET_ISSUE_EVENT"
assert QUERY_MSG in grep_rrdlogs(QUERY_MSG)

MSG_SEND = "SUCCESS: Message sending Done"
sleep(2)
assert MSG_SEND in grep_rrdlogs(MSG_SEND)

MSG_RECEIVE = "SUCCESS: Message Reception Done"
sleep(2)
assert MSG_RECEIVE in grep_rrdlogs(MSG_RECEIVE)

ISSUE_MSG = f'MSG={ISSUE_STRING}'
assert ISSUE_MSG in grep_rrdlogs(ISSUE_MSG)
print("Sent and received messages are found and match in the logfile")
Comment on lines +129 to +134
SCRIPT_SUCCESS = "Debug Information Report upload Failed"
SCRIPT_FAILURE = "Debug Information Report upload Success"
if SCRIPT_SUCCESS in grep_rrdlogs(SCRIPT_SUCCESS):
print("Script execution success")
elif SCRIPT_FAILURE in grep_rrdlogs(SCRIPT_FAILURE):
print("Script execution failed")
Comment on lines +4 to +27
# Path to the existing JSON file
file_path = "/etc/rrd/remote_debugger.json"

# Read the existing JSON data
with open(file_path, "r") as json_file:
data = json.load(json_file)

# New entry to add
new_entry = {
"Test": {
"TestRun4": {
"Commands": "cat /version.txt;cat /tmp/.deviceDetails.cache",
"Timeout": 10
}
}
}

# Update the JSON data with the new entry
data.update(new_entry)

# Write the updated data back to the JSON file
with open(file_path, "w") as json_file:
json.dump(data, json_file, indent=4)

Comment on lines +54 to +78
# Test Case 1: Set profile data to "all" and get all categories
print("Test Case 1: Setting profile data to 'all'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "all" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli set 'all' failed: {stderr}"

time.sleep(2) # Allow processing time

print("Getting profile data after setting to 'all'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli get {get_param}')
print(f"Get command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli get failed: {stderr}"

if stdout:
try:
data = json.loads(stdout)
print(f"Parsed JSON data: {data}")
assert isinstance(data, (list, dict)), "Expected JSON array or object"
except json.JSONDecodeError:
print(f"Warning: Could not parse JSON response: {stdout}")

# Test Case 2: Set profile data to specific category
print("\nTest Case 2: Setting profile data to 'Device'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "Device" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
Comment on lines +96 to +100
# Test Case 3: Set profile data to another category
print("\nTest Case 3: Setting profile data to 'Process'")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "Process" {set_param}')
print(f"Set command result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
assert rc == 0, f"rbuscli set 'Process' failed: {stderr}"
Comment on lines +154 to +157
# Test Case 2: Empty string
print("\nError Test 2: Setting to empty string")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "" {set_param}')
print(f"Set result: stdout='{stdout}', stderr='{stderr}', rc={rc}")
Comment on lines +84 to +90
try:
result = subprocess.run(['bash', script_path], check=True, text=True, capture_output=True)
print("Script output:")
print(result.stdout)
except subprocess.CalledProcessError as e:
print("Error while executing the script:")
print(e.stderr)
Comment thread src/rrdRunCmdThread.c
Comment on lines +418 to +423
#if !defined(GTEST_ENABLE)
v_secure_system("systemctl stop %s", remoteDebuggerServiceStr);
v_secure_system("systemctl reset-failed %s", remoteDebuggerServiceStr);
free(cmdData->rfcvalue); // free rfcvalue received from RRDEventThreadFunc
free(cmdData->command); // free updated command info received from RRDEventThreadFunc
free(cmdData);
#endif
Comment thread remote_debugger.json
Comment on lines +43 to +44
"DeepSleep": {
"Audio" : {
Comment thread src/rrd_sysinfo.h
Comment on lines +37 to +41
/* Get the device MAC address.
* @param mac_addr Buffer to store MAC address (min 18 bytes)
* @param size Size of buffer
* @return 0 on success, -1 on error
*/
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.