Skip to content

Conversation

@NestorDP
Copy link
Owner

Summary

  • What does this PR do? Why is it needed?
  • Link related issues (e.g., Closes #123)

Changes

  • API changes
  • Behavior changes
  • Docs updated
  • Tests added/updated

Details

  • Briefly list the key changes and files touched

How to test

  • Commands and steps to validate locally
  • Include any environment requirements (Linux only, kernel version, etc.)

Screenshots/Logs (optional)

  • Paste relevant output/logs if helpful

Checklist

  • Builds locally (Release + Debug)
  • All tests pass (if applicable)
  • Lint/format pass: make cppcheck / make cpplint / make uncrustify
  • Example(s) tested (if touched)
  • Documentation updated (README/docs)

Risks and rollbacks

  • Potential impact areas, and how to revert if needed

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 74.41860% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/serial.cpp 40.00% 9 Missing ⚠️
test/test_serial_pty.cpp 90.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@NestorDP NestorDP self-assigned this Oct 28, 2025
@NestorDP NestorDP requested a review from Copilot October 28, 2025 15:28
Copy link

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 improves test coverage and refactors system call injection mechanisms for better testability. The changes focus on enhancing the serial port library's testing infrastructure by splitting system call function setters and adding new error injection tests.

Key changes:

  • Split setSystemCallFunctions into separate setPollSystemFunction, setReadSystemFunction, and setIoctlSystemFunction methods for more granular test control
  • Added SetTermios2WithFail test to verify error handling in ioctl operations
  • Implemented getDataLength() method to retrieve current data length configuration
  • Removed unused data_length_ member variable in favor of reading directly from terminal options

Reviewed Changes

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

File Description
test/test_serial_pty.cpp Added new failure injection test for setTermios2; updated existing tests to use split system call setters; added commented-out data length test
src/serial.cpp Replaced direct ioctl calls with ioctl_ wrapper; implemented getDataLength() method; removed unnecessary assignments in setDataLength()
include/libserial/serial.hpp Split system call injection into separate methods; added ioctl_ function wrapper; removed data_length_ member variable; added getDataLength() declaration

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

@NestorDP NestorDP requested a review from Copilot October 28, 2025 21:27
Copy link

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


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

@NestorDP NestorDP requested a review from Copilot October 28, 2025 21:54
Copy link

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


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

@NestorDP NestorDP merged commit 2bcbf68 into main Oct 28, 2025
4 of 5 checks passed
@NestorDP NestorDP deleted the feat-improve-tests branch October 28, 2025 22:09
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.

2 participants