RDK-60308 : RFC 1.2.2 release changelog updates - #180
Conversation
Disable the AccountID Special validation for RDKB
RDKEMW-12201: Bring RDKEMW-12167 to Develop
RFC 1.2.1 release tag
RDK-60308-[tr69hostif, RFC] RDK Coverity Defect Resolution for Device Management
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
RDK-60308 [RFC] RDK Coverity Defect Resolution for Device
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: nhanasi <107076221+nhanasi@users.noreply.github.com>
Co-authored-by: nhanasi <107076221+nhanasi@users.noreply.github.com>
Co-authored-by: nhanasi <107076221+nhanasi@users.noreply.github.com>
Add missing RDK_LOG_FATAL constant to fallback definitions
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
RDKB-63483: RFC Fix L1 Issues with new logger api
RDKEMW-13945 Fix L2 Issue on RFC Component
RDK-60308 [tr69hostif, RFC] RDK Coverity Defect Resolution for Device
|
I have read the CLA Document and I hereby sign the CLA 3 out of 4 committers have signed the CLA. |
There was a problem hiding this comment.
Pull request overview
This PR updates the CHANGELOG for RFC version 1.2.2 and includes related code improvements and test fixes. The changes primarily address Coverity defects, L2 test issues, and logging improvements.
Changes:
- Added CHANGELOG entries for version 1.2.2 with references to multiple PRs and commits
- Improved C++ code with modern initialization patterns, std::move optimizations, and better error handling
- Added rdk_debug.h header with fallback RDK logger definitions for builds without the logger library
- Updated test fixtures with new account IDs and log file references
- Commented out webpa test in run_l2.sh script
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| CHANGELOG.md | Added version 1.2.2 release notes with PR and commit references |
| rfcMgr/rfc_xconf_handler.cpp | Multiple improvements: string initialization using direct construction, std::move optimizations, errno handling, default case in switch, and RDKB-specific conditional compilation |
| rfcMgr/rfc_manager.cpp | Replaced old logger initialization with new extended API for non-RDKB builds |
| rfcMgr/rdk_debug.h | New header file providing fallback definitions for RDK logger when not available |
| test/functional-tests/tests/test_rfc_unknown_accountid.py | Updated account IDs in test assertions and changed log file reference from RFC_LOG_FILE to LOG_FILE |
| test/functional-tests/tests/rfc_test_helper.py | Added new LOG_FILE constant pointing to rfcscript.txt.1 |
| run_l2.sh | Commented out webpa test execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| rdk_logger_ext_config_t config = { | ||
| .pModuleName = RFCMGRLOG, /* Module name */ | ||
| .loglevel = RDK_LOG_INFO, /* Default log level */ | ||
| .output = RDKLOG_OUTPUT_CONSOLE, /* Output to console (stdout/stderr) */ | ||
| .format = RDKLOG_FORMAT_WITH_TS, /* Timestamped format */ | ||
| .pFilePolicy = NULL /* Not using file output, so NULL */ | ||
| }; | ||
|
|
||
| if (rdk_logger_ext_init(&config) != RDK_SUCCESS) { | ||
| printf("RFC : ERROR - Extended logger init failed\n"); | ||
| } | ||
| #endif |
There was a problem hiding this comment.
Inconsistent indentation: This code block uses tabs for indentation while the surrounding code uses spaces. The indentation style should be consistent throughout the file. Replace tabs with spaces to match the existing style in the file.
| assert grep_log_file(LOG_FILE, FEATURE_NAME_VALUE), f"Expected '{FEATURE_NAME_VALUE}' in log file." | ||
| assert grep_log_file(LOG_FILE, RFC_PARAM), f"Expected '{RFC_PARAM}' in log file." | ||
| assert grep_log_file(LOG_FILE, XCONF_RESP_RECEIVED_ACTID_UNKNOWN), f"Expected '{XCONF_RESP_RECEIVED_ACTID_UNKNOWN}' in log file." | ||
| assert grep_log_file(LOG_FILE, XCONF_RESP_CMP_MSG), f"Expected '{XCONF_RESP_CMP_MSG}' in log file." | ||
| assert grep_log_file(LOG_FILE, ACTID_REPLACE_AUTHSERVICE), f"Expected '{ACTID_REPLACE_AUTHSERVICE}' in log file." | ||
| assert grep_log_file(LOG_FILE, ACTID_UPDATE), f"Expected '{ACTID_UPDATE}' in log file." |
There was a problem hiding this comment.
Inconsistent log file variable usage: This test file now uses LOG_FILE (which refers to "/opt/logs/rfcscript.txt.1") instead of RFC_LOG_FILE (which refers to "/opt/logs/rfcscript.txt") that is used by all other test files in the test suite. This deviation from the established pattern may cause test failures if the expected log messages are written to rfcscript.txt instead of rfcscript.txt.1. Consider using RFC_LOG_FILE for consistency with the rest of the test suite, unless there's a specific requirement for this test to check a different log file.
| assert grep_log_file(LOG_FILE, FEATURE_NAME_VALUE), f"Expected '{FEATURE_NAME_VALUE}' in log file." | |
| assert grep_log_file(LOG_FILE, RFC_PARAM), f"Expected '{RFC_PARAM}' in log file." | |
| assert grep_log_file(LOG_FILE, XCONF_RESP_RECEIVED_ACTID_UNKNOWN), f"Expected '{XCONF_RESP_RECEIVED_ACTID_UNKNOWN}' in log file." | |
| assert grep_log_file(LOG_FILE, XCONF_RESP_CMP_MSG), f"Expected '{XCONF_RESP_CMP_MSG}' in log file." | |
| assert grep_log_file(LOG_FILE, ACTID_REPLACE_AUTHSERVICE), f"Expected '{ACTID_REPLACE_AUTHSERVICE}' in log file." | |
| assert grep_log_file(LOG_FILE, ACTID_UPDATE), f"Expected '{ACTID_UPDATE}' in log file." | |
| assert grep_log_file(RFC_LOG_FILE, FEATURE_NAME_VALUE), f"Expected '{FEATURE_NAME_VALUE}' in log file." | |
| assert grep_log_file(RFC_LOG_FILE, RFC_PARAM), f"Expected '{RFC_PARAM}' in log file." | |
| assert grep_log_file(RFC_LOG_FILE, XCONF_RESP_RECEIVED_ACTID_UNKNOWN), f"Expected '{XCONF_RESP_RECEIVED_ACTID_UNKNOWN}' in log file." | |
| assert grep_log_file(RFC_LOG_FILE, XCONF_RESP_CMP_MSG), f"Expected '{XCONF_RESP_CMP_MSG}' in log file." | |
| assert grep_log_file(RFC_LOG_FILE, ACTID_REPLACE_AUTHSERVICE), f"Expected '{ACTID_REPLACE_AUTHSERVICE}' in log file." | |
| assert grep_log_file(RFC_LOG_FILE, ACTID_UPDATE), f"Expected '{ACTID_UPDATE}' in log file." |
| RDK_LOG(RDK_LOG_ERROR, LOG_RFCMGR,"[%s][%d]Failed to remove file %s\n", __FUNCTION__, __LINE__, DIRECT_BLOCK_FILENAME); | ||
| if (errno != ENOENT) | ||
| { | ||
| RDK_LOG(RDK_LOG_ERROR, LOG_RFCMGR,"[%s][%d]Failed to remove file %s,errno=%d\n", __FUNCTION__, __LINE__, DIRECT_BLOCK_FILENAME,errno); |
There was a problem hiding this comment.
Missing spaces in error message: The error log message is missing spaces in two places: after the closing bracket ']' before 'Failed', and after the comma before 'errno'. It should be "[%s][%d] Failed to remove file %s, errno=%d\n" for consistency with other log messages in the codebase and better readability.
| RDK_LOG(RDK_LOG_ERROR, LOG_RFCMGR,"[%s][%d]Failed to remove file %s,errno=%d\n", __FUNCTION__, __LINE__, DIRECT_BLOCK_FILENAME,errno); | |
| RDK_LOG(RDK_LOG_ERROR, LOG_RFCMGR,"[%s][%d] Failed to remove file %s, errno=%d\n", __FUNCTION__, __LINE__, DIRECT_BLOCK_FILENAME,errno); |
| if (errno != ENOENT) | ||
| { | ||
| RDK_LOG(RDK_LOG_ERROR, LOG_RFCMGR,"[%s][%d]Failed to remove file %s,errno=%d\n", __FUNCTION__, __LINE__, DIRECT_BLOCK_FILENAME,errno); | ||
| } |
There was a problem hiding this comment.
Inconsistent indentation: This code block uses tabs for indentation while the surrounding code uses spaces. The indentation style should be consistent throughout the file. Replace tabs with spaces to match the existing style in the file.
Code Coverage Summary |
RDK-60308 : RFC 1.2.2 release changelog updates