Skip to content

Feature/rdk 60236 structure#192

Open
Abhinavpv28 wants to merge 89 commits intodevelopfrom
feature/RDK-60236_structure
Open

Feature/rdk 60236 structure#192
Abhinavpv28 wants to merge 89 commits intodevelopfrom
feature/RDK-60236_structure

Conversation

@Abhinavpv28
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 5, 2026 16:45
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 5, 2026 16:45
Copy link
Copy Markdown

Copilot AI commented May 5, 2026

@copilot /
[ RUN ] ProcessIssueTypeEvntTest.IssueTypeWithInvalidSuffixTreatedAsBase
Error!!! RDK Remote Debugger UT FAILED. EXIT!!!
...

Fixed in commit 17289c1. The segfault was caused by two NULL-pointer dereferences in the GTEST_ENABLE build path when rbuf->jsonPath is NULL:

  1. processIssueTypeInStaticProfile: readAndParseJSON(rbuf->jsonPath)fopen(NULL) → segfault. Added a NULL guard so jsonParsed stays NULL and the code falls through to processIssueTypeInInstalledPackage as it would for any parse failure.

  2. processIssueTypeInInstalledPackage: strlen(rbuf->jsonPath) with NULL → segfault. Added an early-return guard when rbuf->jsonPath is NULL in GTEST mode.

All 328 tests now pass including ProcessIssueTypeEvntTest.IssueTypeWithInvalidSuffixTreatedAsBase.

@Abhinavpv28
Copy link
Copy Markdown
Contributor Author

@copilot
2026-05-06T01:34:03.3142692Z [ RUN ] IssueTypeSplitterTest.HandlesStringWithSpecialCharacters
2026-05-06T01:34:03.3143056Z rrdUnitTestRunner.cpp:1872: Failure
2026-05-06T01:34:03.3143310Z Expected equality of these values:
2026-05-06T01:34:03.3143525Z count
2026-05-06T01:34:03.3143680Z Which is: 5
2026-05-06T01:34:03.3143835Z 4
2026-05-06T01:34:03.3144133Z [ FAILED ] IssueTypeSplitterTest.HandlesStringWithSpecialCharacters (0 ms)

… 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>
Copilot AI review requested due to automatic review settings May 6, 2026 01:52
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 6, 2026 01:52
Copy link
Copy Markdown

Copilot AI commented May 6, 2026

@copilot
2026-05-06T01:34:03.3142692Z [ RUN ] IssueTypeSplitterTest.HandlesStringWithSpecialCharacters
2026-05-06T01:34:03.3143056Z rrdUnitTestRunner.cpp:1872: Failure
...

Fixed in commit 2d65f7e. The failure was caused by commit 31494a7 (which moved removeSpecialCharacterfromIssueTypeList() out of issueTypeSplitter() and into processIssueTypeEvent()). After that change, issueTypeSplitter() performs pure token splitting with no built-in special-char removal, so the test assertions were stale.

Updated HandlesStringWithSpecialCharacters to reflect the new contract:

  • Input "a@,b,&,cd,ef" now correctly returns 5 raw tokens ("a@", "b", "&", "cd", "ef") since issueTypeSplitter no longer filters characters internally.

All 328 tests pass.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Code Coverage Summary

                               Total:|84.0%   6157|97.2%  1636|    -      0

@Abhinavpv28
Copy link
Copy Markdown
Contributor Author

@copilot i passed empty value, but it recieves random value

2026-05-06T03:12:25.585Z remotedebugger[3957]: [INFO ] [REMOTEDEBUGGER] [4029] [_remoteDebuggerEventHandler:423]: Received event for RRD_SET_ISSUE_EVENT Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType
2026-05-06T03:12:25.586Z remotedebugger[3957]: [INFO ] [REMOTEDEBUGGER] [4029] [pushIssueTypesToMsgQueue:498]: SUCCESS: Message sending Done, ID=0 MSG= Size=1 Type=1 AppendMode=0!
2026-05-06T03:12:25.586Z remotedebugger[3957]: [INFO ] [REMOTEDEBUGGER] [4045] [getIssueInfo:288]: Received Main Node= LOG.RDK.REMOTEDEBUGGER, SubNode= (null)
2026-05-06T03:12:25.586Z remotedebugger[3957]: [INFO ] [REMOTEDEBUGGER] [4045] [processIssueTypeInStaticProfile:422]: Checking Static Profile...

Copilot AI review requested due to automatic review settings May 6, 2026 03:26
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 6, 2026 03:26
Copy link
Copy Markdown

Copilot AI commented May 6, 2026

...

Fixed in commit f64d401.

The root cause: when the IssueType value from RBUS is whitespace-only (e.g. a single space), _remoteDebuggerEventHandler passes it through (the dataMsg[0] == '\0' guard doesn't catch non-NUL whitespace). In processIssueTypeEvent, split_issue_type returns that whitespace as the base, and removeSpecialCharacterfromIssueTypeList then strips it to "" — but there was no post-strip empty check, so the empty base reached processIssueType and ultimately getIssueInfo with an empty mdata.

Two changes in processIssueTypeEvent:

  1. Moved removeSpecialCharacterfromIssueTypeList(base) to run before dataMsgLen is calculated
  2. Added a post-sanitization empty-base guard — if stripping leaves base empty, the token is skipped with an error log and we continue to the next token

New tests added: WhitespaceOnlyIssueTypeIsSkipped and EmptyStringIssueTypeIsSkipped.

@Abhinavpv28
Copy link
Copy Markdown
Contributor Author

@copilot
after our changes to add uuid suffix, the file is uploading, asper the logs. in the analytics portal i can see the file. but always hrowing download failed

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Code Coverage Summary

                               Total:|84.1%   6183|97.3%  1644|    -      0

…ectly

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>
Copilot AI review requested due to automatic review settings May 6, 2026 06:20
@Abhinavpv28 Abhinavpv28 review requested due to automatic review settings May 6, 2026 06:20
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.

3 participants