Add test coverage for RDKLOG_FORMAT_WITH_TID, RDKLOG_FORMAT_WITH_TS_TID, and RDKLOG_FORMAT_DETAIL_WITHOUT_TS formats#50
Conversation
Co-authored-by: karuna2git <48997923+karuna2git@users.noreply.github.com>
…tation Co-authored-by: karuna2git <48997923+karuna2git@users.noreply.github.com>
Co-authored-by: karuna2git <48997923+karuna2git@users.noreply.github.com>
Co-authored-by: karuna2git <48997923+karuna2git@users.noreply.github.com>
Co-authored-by: karuna2git <48997923+karuna2git@users.noreply.github.com>
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
There was a problem hiding this comment.
Pull request overview
This pull request adds test coverage for three log format enums that were introduced in PR #49 but lacked corresponding tests. The tests validate that the logger correctly applies thread ID, timestamp, and detailed formatting options.
Changes:
- Added three new test cases to
rdkLoggerRotationTest.cppto validateRDKLOG_FORMAT_WITH_TID,RDKLOG_FORMAT_WITH_TS_TID, andRDKLOG_FORMAT_DETAIL_WITHOUT_TSformats - Each test follows the existing pattern using
RUN_IN_FORKfor process isolation, initializes the logger with a specific format, generates test logs, and validates the output - Tests verify format-specific content by reading log files and checking for expected elements (thread IDs, timestamps, module names)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>
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>
PR #49 added three new log format enums (
RDKLOG_FORMAT_WITH_TID,RDKLOG_FORMAT_WITH_TS_TID,RDKLOG_FORMAT_DETAIL_WITHOUT_TS) without corresponding test coverage inrdkLoggerRotationTest.cpp.Changes
Added three test cases to
rdkLoggerRotationTest.cpp:FormatWithTID: Validates thread ID inclusion in log outputFormatWithTSTID: Validates both timestamp and thread ID in log outputFormatDetailWithoutTS: Validates detailed format without timestampEach test:
rdk_logger_ext_init()RUN_IN_FORKpattern for test isolationAdded
.gitignorefor autotools build artifacts🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.