Skip to content

rebase#156

Open
Abhinavpv28 wants to merge 47 commits into
feature/rrdl2_backup_with_l2flagfrom
develop
Open

rebase#156
Abhinavpv28 wants to merge 47 commits into
feature/rrdl2_backup_with_l2flagfrom
develop

Conversation

@Abhinavpv28

Copy link
Copy Markdown
Contributor

No description provided.

rdkcmf-jenkins and others added 4 commits June 24, 2025 15:09
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 ]
@Abhinavpv28
Abhinavpv28 requested a review from a team as a code owner September 24, 2025 15:38
rdkcmf-jenkins and others added 9 commits September 25, 2025 18:24
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>
@CLAassistant

CLAassistant commented Oct 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.
3 out of 4 committers have signed the CLA.

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

… C (#167)

* Add comprehensive HLD documentation for uploadRRDLogs.sh migration to C

- Requirements document with functional specs, I/O definitions, and constraints
- High-Level Design with architecture, module breakdown, and data flows
- Detailed flowcharts for all major operations (Mermaid + text-based)
- Sequence diagrams showing component interactions
- Low-Level Design with complete C code, data structures, and implementations

Documentation covers migration of uploadRRDLogs.sh to embedded C program
optimized for low-memory, low-CPU embedded systems with full error handling,
security considerations, and platform portability.

- Replace custom MAC retrieval logic with TR-181 parameters via RBus
  - Device.DeviceInfo.X_COMCAST-COM_STB_MAC (Video)
  - Device.DeviceInfo.X_COMCAST-COM_CM_MAC (Broadband)
  - Device.X_CISCO_COM_MACAddress (Alternative)
- Add cache file fallback (/tmp/device_details.cache, /tmp/estb_mac)
- Add early exit optimization in config parser when all required properties found
- Mark libarchive as mandatory dependency, remove tar command fallback
Copilot AI review requested due to automatic review settings December 4, 2025 23:03

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

This PR appears to be a rebase that includes significant additions for L2 test coverage improvements and new documentation for an uploadRRDLogs C implementation. The changes include:

  • Enhanced test coverage with new test files and improved existing tests
  • Comprehensive documentation for uploadRRDLogs migration from shell script to C
  • New power management integration with deepsleep functionality
  • Build system improvements with L2 support configuration
  • Updated CI/CD workflows and project maintenance files

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/functional-tests/tests/test_rrd_single_instance.py Improved PID handling with proper list operations
test/functional-tests/tests/test_rrd_dynamic_subcategory_report.py New comprehensive test for dynamic subcategory reporting
test/functional-tests/tests/test_rrd_deepsleep_static_report.py New test for deepsleep static report functionality
test/functional-tests/tests/test_rrd_append_report.py New test for report append functionality
test/functional-tests/tests/power_controller.h New power controller API header with comprehensive interface
test/functional-tests/tests/deepsleep_main.c New C test implementation for deepsleep event handling
test/functional-tests/tests/create_json.sh Updated JSON creation with additional test configurations
test/functional-tests/tests/Makefile New Makefile for compiling C test binaries
test/functional-tests/features/*.feature New Gherkin feature files for BDD test scenarios
src/unittest/mocks/pwrMgr.h New mock header for power manager IARM interface
src/rrdInterface.c Updated RBus subscription logic with L2 support conditionals
src/rrdIarmEvents.c Updated WebCfg force sync error handling with L2 support
run_l2.sh Added new test executions and configuration copy
remote_debugger.json Added DeepSleep configuration profiles
docs/uploadRRDLogs_*.md New comprehensive documentation for uploadRRDLogs C migration
cov_build.sh Updated build script with L2 support flags
configure.ac Added L2 support configuration option
CHANGELOG.md Updated with 1.2.9 release notes
.github/workflows/*.yml Updated CI/CD workflows with improved security
.github/CODEOWNERS Simplified code ownership

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

DEBUG_FILE = "Adding Details of Debug commands to Output File"
assert DEBUG_FILE in grep_rrdlogs(DEBUG_FILE)

issue_string = "DEEPSLEEP"

Copilot AI Dec 4, 2025

Copy link

Choose a reason for hiding this comment

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

Variable issue_string is not used.

Suggested change
issue_string = "DEEPSLEEP"

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,134 @@
import json
from helper_functions import *

Copilot AI Dec 4, 2025

Copy link

Choose a reason for hiding this comment

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

Import pollutes the enclosing namespace, as the imported module helper_functions does not define 'all'.

Suggested change
from helper_functions import *
from helper_functions import (
check_file_exists,
check_directory_exists,
kill_rrd,
remove_logfile,
run_shell_silent,
run_shell_command,
grep_rrdlogs,
JSON_FILE,
OUTPUT_DIR,
APPEND_JSON_FILE,
DYNAMIC_DIR,
)

Copilot uses AI. Check for mistakes.
# limitations under the License.
##########################################################################

from helper_functions import *

Copilot AI Dec 4, 2025

Copy link

Choose a reason for hiding this comment

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

Import pollutes the enclosing namespace, as the imported module helper_functions does not define 'all'.

Suggested change
from helper_functions import *
from helper_functions import (
JSON_FILE,
check_file_exists,
OUTPUT_DIR,
check_directory_exists,
kill_rrd,
remove_logfile,
run_shell_silent,
run_shell_command,
grep_rrdlogs,
remove_outdir_contents
)

Copilot uses AI. Check for mistakes.

import json
import subprocess
from helper_functions import *

Copilot AI Dec 4, 2025

Copy link

Choose a reason for hiding this comment

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

Import pollutes the enclosing namespace, as the imported module helper_functions does not define 'all'.

Suggested change
from helper_functions import *
from helper_functions import (
JSON_FILE,
check_file_exists,
OUTPUT_DIR,
check_directory_exists,
kill_rrd,
remove_logfile,
run_shell_silent,
run_shell_command,
sleep,
grep_rrdlogs,
)

Copilot uses AI. Check for mistakes.
# limitations under the License.
##########################################################################

import json

Copilot AI Dec 4, 2025

Copy link

Choose a reason for hiding this comment

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

Import of 'json' is not used.

Suggested change
import json

Copilot uses AI. Check for mistakes.
Vismalskumar0 and others added 2 commits January 12, 2026 13:55
* RDK-58172: integrate dcm-agent uploadstblogs and cleanup logging; update Makefile and upload flow

* Add unit tests for RRD upload orchestration

This file contains unit tests for the RRD upload orchestration, covering various aspects such as configuration loading, system information retrieval, log directory validation, and the entire upload workflow.

* Update Makefile.am

* Remove uploadRRDLogs program from Makefile

* Refactor uploadDebugoutput to use upload API

Updated the uploadDebugoutput function to call the upload API instead of executing a script. Enhanced logging for upload orchestration success and failure.

* Refactor upload orchestration into rrd_upload_orchestrate

Refactor upload orchestration logic into a separate function and remove deprecated main function.

* Update rrd_config.h

* Include common_device_api.h in rrd_sysinfo.h

Added inclusion of common_device_api.h for device API access.

* Add comprehensive functional tests for C API upload orchestration

- Add BDD feature file with 20 test scenarios for rrd_upload_orchestrate
- Add Python test implementation with 14 test functions
- Test coverage includes:
  * Valid and invalid parameter handling
  * Configuration loading from multiple sources (properties, RFC, DCM)
  * MAC address retrieval and timestamp generation
  * Issue type sanitization and normalization
  * Archive creation and format validation
  * Upload execution and lock handling
  * Cleanup operations
  * Error code propagation (codes 1-11)
  * Comprehensive logging verification
  * Integration with uploadDebugoutput wrapper

- Tests validate the complete flow from event trigger through C API
  execution to upload completion
- Helper class provides utilities for test setup, archive validation,
  and log verification

Refactor source validation and log handling. Improve error handling for directory operations and add functionality to move live logs.

* Refactor log upload handling and cleanup process
Updated log upload process to handle LOGUPLOAD_ENABLE case and adjusted archive creation and upload paths.
* RDKEMW-12334-The log entries in remote-debugger.log 

RDKEMW-12334-The log entries in remote-debugger.log differ between C binary files and script files when compared

* Change the log from Debug to Info
* Apply suggestions from code review

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

---------

Co-authored-by: Abhinavpv28 <162570454+Abhinavpv28@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 21, 2026 19:27

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 56 out of 56 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +149 to +150
SCRIPT_SUCCESS = "Debug Information Report upload Failed"
SCRIPT_FAILURE = "Debug Information Report upload Success"

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

The variable names SCRIPT_SUCCESS and SCRIPT_FAILURE appear to be swapped. SCRIPT_SUCCESS is assigned "Debug Information Report upload Failed" but should be "Debug Information Report upload Success". Similarly, SCRIPT_FAILURE is assigned "Debug Information Report upload Success" but should be "Debug Information Report upload Failed".

Copilot uses AI. Check for mistakes.
if '.' in ISSUE_STRING:
ISSUE_NODE, ISSUE_SUBNODE = ISSUE_STRING.split('.')
else:
node = ISSUE_STRING

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

Variable node is not used.

Copilot uses AI. Check for mistakes.
ISSUE_NODE, ISSUE_SUBNODE = ISSUE_STRING.split('.')
else:
node = ISSUE_STRING
subnode = None

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

Variable subnode is not used.

Copilot uses AI. Check for mistakes.
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"

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

Variable ISSUE_FOUND is not used.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,134 @@
import json
from helper_functions import *

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

Import pollutes the enclosing namespace, as the imported module helper_functions does not define 'all'.

Copilot uses AI. Check for mistakes.
# limitations under the License.
##########################################################################

from helper_functions import *

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

Import pollutes the enclosing namespace, as the imported module helper_functions does not define 'all'.

Copilot uses AI. Check for mistakes.
# limitations under the License.
##########################################################################

from helper_functions import *

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

Import pollutes the enclosing namespace, as the imported module helper_functions does not define 'all'.

Copilot uses AI. Check for mistakes.

import json
import subprocess
from helper_functions import *

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

Import pollutes the enclosing namespace, as the imported module helper_functions does not define 'all'.

Copilot uses AI. Check for mistakes.
# limitations under the License.
##########################################################################

import json

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

Import of 'json' is not used.

Copilot uses AI. Check for mistakes.
nhanasi and others added 4 commits January 22, 2026 19:45
…ode (#178)

* Update Makefile.am

* Update rrdExecuteScript.c

* Update rrd_upload.h

* Update Makefile.am

* Update Makefile.am

* Update Makefile.am

* Update Makefile.am

---------

Co-authored-by: nhanasi <navihansi@gmail.com>
Copilot AI review requested due to automatic review settings February 17, 2026 16:08
naveenkumarhanasi and others added 4 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 87 out of 87 changed files in this pull request and generated 6 comments.

Comment on lines +49 to +52
# 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 on lines +5 to +10
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)

Comment on lines +69 to +70
ISSUE_MSG = f'MSG={ISSUE_STRING}'
assert ISSUE_MSG in grep_rrdlogs(ISSUE_MSG)
Comment on lines +129 to +130
SCRIPT_SUCCESS = "Debug Information Report upload Failed"
SCRIPT_FAILURE = "Debug Information Report upload Success"
Comment thread configure.ac
Comment on lines +72 to +76
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/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

… 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 88 out of 88 changed files in this pull request and generated 12 comments.

Comments suppressed due to low confidence (2)

test/functional-tests/tests/test_rrd_profile_data.py:80

  • Same issue as above: this rbuscli set call appears to put the value before the parameter name and omits the type. Align it with the suite's standard rbuscli set <param> string <value> form so the test actually exercises the RBUS set handler.
    test/functional-tests/tests/test_rrd_profile_data.py:100
  • Same malformed rbuscli set syntax here (value-first, missing type). This can make the test pass/fail for the wrong reason and should be updated to the standard rbuscli set <param> string <value> pattern used elsewhere in the suite.

Comment on lines +54 to +58
# 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 on lines +133 to +141
# Test Case 1: Set to non-existent category
print("Error Test 1: Setting to non-existent category")
stdout, stderr, rc = run_rbuscli_cmd(f'rbuscli set "NonExistentCategory" {set_param}')
print(f"Set result: stdout='{stdout}', stderr='{stderr}', rc={rc}")

# Check if this is an invalid arguments error or successful set
if "Invalid arguments" in stdout:
print("rbuscli returned invalid arguments error (expected for malformed command)")
else:
Comment on lines 33 to +47
def test_second_remotedebugger_instance_is_not_started():
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()
Comment on lines +141 to +144
_rdmManagerEventHandler(owner, eventId, &eventData, len);
// Now wait for the thread to finish (if it ever does)
pthread_join(RRDTR69ThreadID, NULL);
RDK_LOG(RDK_LOG_DEBUG,LOG_REMDEBUG,"[%s:%d]:Stopping RDK Remote Debugger Daemon \n",__FUNCTION__,__LINE__);
Comment thread src/rrd_upload.c
Comment on lines +36 to +41
int rrd_upload_execute(const char *log_server, const char *protocol, const char *http_link, const char *working_dir, const char *archive_filename, const char *source_dir) {
// Validate required parameters
if (!log_server || strlen(log_server) == 0) {
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "%s: Invalid or empty log_server\n", __FUNCTION__);
return -1;
}
Comment on lines +69 to +70
ISSUE_MSG = f'MSG={ISSUE_STRING}'
assert ISSUE_MSG in grep_rrdlogs(ISSUE_MSG)
Comment thread src/unittest/Makefile.am
Comment on lines 27 to +28
# Define the compiler flags
COMMON_CXXFLAGS = -frtti -fprofile-arcs -ftest-coverage
COMMON_CXXFLAGS = -frtti -fprofile-arcs -ftest-coverage -fpermissive
Comment thread src/Makefile.am
Comment on lines +15 to 18
remotedebugger_SOURCES = rrdMain.c rrdEventProcess.c rrdJsonParser.c rrdRunCmdThread.c rrdCommandSanity.c rrdDynamic.c rrdExecuteScript.c rrdMsgPackDecoder.c rrdInterface.c
remotedebugger_CFLAGS = -I$(top_srcdir)/include/rrd -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/trower-base64/ -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/rbus/ -I$(PKG_CONFIG_SYSROOT_DIR)${includedir} $(CJSON_CFLAGS)
AM_LDFLAGS="-lpthread -lrdkloggers -lmsgpackc -ltrower-base64 -lwebconfig_framework -lrbus -lsecure_wrapper "

Comment thread src/Makefile.am
Comment on lines 19 to 23
if IARMBUS_ENABLE
remotedebugger_SOURCES += rrdIarmEvents.c
remotedebugger_SOURCES += rrdIarmEvents.c uploadRRDLogs.c rrd_config.c rrd_sysinfo.c rrd_logproc.c rrd_archive.c rrd_upload.c
remotedebugger_CFLAGS += -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/rdk/iarmbus/ -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/rdk/iarmmgrs/rdmmgr -I$(PKG_CONFIG_SYSROOT_DIR)${includedir}/rdk/iarmmgrs-hal -DIARMBUS_SUPPORT
AM_LDFLAGS += "-lIARMBus -lrfcapi -ltr181api"
endif
Comment thread src/rrdExecuteScript.c
Comment on lines 20 to 24
#include "rrdExecuteScript.h"
#if !defined(GTEST_ENABLE)
#define RRD_SCRIPT "/lib/rdk/uploadRRDLogs.sh"
#else
#define RRD_SCRIPT "./mockSampleUploadScript.sh"
#endif
#if !defined(GTEST_ENABLE)
#include "secure_wrapper.h"
#endif
Co-authored-by: Hanasi <nhanas001c@cable.comcast.com>
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

* Rename test/functional-tests/L2_Test_Coverage.md to test/functional-tests/docs/L2_Test_Coverage.md

* Create L1_Test_Coverage.md
Comment thread src/rrdRunCmdThread.c

/* Open debug_output.txt file*/
filePointer = fopen(finalOutFile, "a+");
filePointer = fopen(finalOutFile, "w+");
Comment thread src/rrd_archive.c
return -4;
}

unsigned long long total = user + nice + system + idle + iowait + irq + softirq + steal;
Comment thread src/rrd_archive.c
return -4;
}

unsigned long long total = user + nice + system + idle + iowait + irq + softirq + steal;
Comment thread src/rrd_archive.c
return -4;
}

unsigned long long total = user + nice + system + idle + iowait + irq + softirq + steal;
Comment thread src/rrd_archive.c
return -4;
}

unsigned long long total = user + nice + system + idle + iowait + irq + softirq + steal;
Comment thread src/rrd_sysinfo.c
}
memset(timestamp, 0, size);
time_t now = time(NULL);
struct tm *tm_info = localtime(&now);
* 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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

naveenkumarhanasi and others added 4 commits June 9, 2026 16:51
RRD  release for 1.3.5 version
…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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

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.