Skip to content

RDKEMW-13945-Fix L1 Issue on RFC Component#181

Merged
shibu-kv merged 7 commits intodevelopfrom
feature/unittest_failure
Feb 19, 2026
Merged

RDKEMW-13945-Fix L1 Issue on RFC Component#181
shibu-kv merged 7 commits intodevelopfrom
feature/unittest_failure

Conversation

@nhanasi
Copy link
Contributor

@nhanasi nhanasi commented Feb 17, 2026

Added the mocks to make Unit Test work after the logger changes

Copilot AI review requested due to automatic review settings February 17, 2026 22:12
@nhanasi nhanasi requested a review from a team as a code owner February 17, 2026 22:12
Copy link
Contributor

Copilot AI left a comment

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 removes the rfcMgr/rdk_debug.h header, which previously provided RDK logger includes and fallback logging definitions used by multiple components.

Changes:

  • Deleted rfcMgr/rdk_debug.h (logger wrapper / fallback definitions).
Comments suppressed due to low confidence (1)

rfcMgr/rdk_debug.h:1

  • Deleting this header will break builds: rfcMgr/rfc_common.h (and other sources like rfcapi/rfcapi.cpp and tr181api/tr181api.cpp) include "rdk_debug.h", and rfcMgr/Makefile.am adds -I${top_srcdir}/rfcMgr so the compiler previously resolved it from this path. Unless every include is updated to a different header and the build is adjusted to provide that replacement on the include path, this PR introduces a hard compile failure. Please either restore rfcMgr/rdk_debug.h or replace it with an equivalent header and update all include sites/build flags accordingly.

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

Copilot AI review requested due to automatic review settings February 18, 2026 12:59
Copy link
Contributor

Copilot AI left a comment

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

Comments suppressed due to low confidence (2)

rfcMgr/rdk_debug.h:1

  • The PR title "TEST" is not descriptive and does not explain the purpose or intent of deleting this entire header file. A proper title should describe what is being changed and why, especially for a significant change like removing a widely-used header file. This appears to be either a test commit that should not have been opened as a PR, or lacks proper documentation of the intended change.
    rfcMgr/rdk_debug.h:1
  • Deleting this header file will break the build. This file is included by multiple source files in the codebase including rfcMgr/rfc_common.h, rfcapi/rfcapi.cpp, and tr181api/tr181api.cpp. Additionally, rfcMgr/rfc_manager.cpp uses the rdk_logger_ext_init function and rdk_logger_ext_config_t type which are defined only in this file and not in the test mock version at rfcMgr/gtest/mocks/rdk_debug.h. The production code in rfc_manager.cpp also uses RDK_LOGGER_INIT macro, RDK_SUCCESS constant, RDKLOG_OUTPUT_CONSOLE, and RDKLOG_FORMAT_WITH_TS enums that are defined in this file. Files that include this header also depend on RDK_LOG_FATAL, RDK_LOG_WARN, and RDK_LOG_TRACE1 definitions that are missing from the mock version.

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

Copilot AI review requested due to automatic review settings February 18, 2026 13:20
Copy link
Contributor

Copilot AI left a comment

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


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

@Vismalskumar0 Vismalskumar0 changed the title TEST Added the mocks to make Unit Test work after the logger changes Feb 18, 2026
@Vismalskumar0 Vismalskumar0 changed the title Added the mocks to make Unit Test work after the logger changes RDKEMW-13945-Fix L1 Issue on RFC Component Feb 18, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 19, 2026 08:48
Copy link
Contributor

Copilot AI left a comment

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

Comments suppressed due to low confidence (1)

rfcMgr/gtest/mocks/rdk_debug.h:75

  • The RDK_LOG macro does not handle the RDK_LOG_WARN level, even though RDK_LOG_WARN is defined on line 31 and used in production code (e.g., rfc_common.cpp:357, rfc_manager.cpp:550, rfc_xconf_handler.cpp:1087). When warnings are logged in tests, they will be printed without a "WARN:" prefix, making it harder to distinguish warning messages from info or other log levels. Add an else-if branch to handle RDK_LOG_WARN similar to the existing branches for DEBUG, INFO, and ERROR.
#define RDK_LOG(level, module, ...) \
    do { \
        if (( level == RDK_LOG_DEBUG )) { \
            printf("DEBUG: %s: ", module); \
        } \
        else if (( level == RDK_LOG_INFO )) { \
            printf("INFO: %s: ", module); \
        } \
        else if (( level == RDK_LOG_ERROR )) { \
            printf("ERROR: %s: ", module); \
        } \
        printf(__VA_ARGS__); \
    } while (0)

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

@shibu-kv shibu-kv merged commit fddcb81 into develop Feb 19, 2026
19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants