Skip to content

v2.2.x Chore - Enhance usage testing ideas #394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
coderabbitai bot opened this issue May 6, 2025 · 1 comment
Open

v2.2.x Chore - Enhance usage testing ideas #394

coderabbitai bot opened this issue May 6, 2025 · 1 comment
Labels
Chore Miscellaneous chores to maintain the project Testing Something can be verified

Comments

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 6, 2025

Enhance Pipe Mode Testing

This issue documents proposed testing improvements for the --pipe mode added in v2.1.0, as discussed in PR #392.

Proposed Test Improvements

1. Edge Cases

  • Add tests for empty input: printf "" | ${COVERAGE_CMD} multicast SAY...
  • Test special characters and multi-line input with various combinations of escape sequences and control characters
  • Test maximum line input length scenarios

2. Large Messages

  • Create tests with generated large payloads: head -c 100000 /dev/urandom | base64 | ${COVERAGE_CMD} multicast SAY...
  • Test behavior with payloads near or exceeding UDP packet size limits
  • Test fragmentation handling with very large inputs

3. Interrupted Pipes

  • Test behavior when the sender is killed mid-transmission using process substitution or a trap
  • Ensure proper cleanup of resources when pipe streams are unexpectedly terminated
  • Test partial message handling

4. Deterministic Timing

  • Replace some sleep commands with a polling mechanism that waits for specific conditions
  • Implement more reliable synchronization between test processes
  • Add logging markers that can be used to verify test sequence

Implementation Considerations

  • Maintain script portability across different environments
  • Follow existing testing patterns and conventions
  • Minimize introduction of new dependencies
  • Keep test execution time reasonable

This enhancement will improve test coverage and reliability for the pipe mode functionality, helping to identify potential edge case bugs.

Related to PR #392

@reactive-firewall
Copy link
Owner

🤔

Additionally, should have tests for micro environments

  • test behavior with process limited to small values (eg. see ulimit)
  • should also test python interfaces where relevant:
    • large messages
    • interruptions
    • performance with more deterministic timing
    • additional special characters

@reactive-firewall reactive-firewall added the Testing Something can be verified label May 6, 2025
@reactive-firewall reactive-firewall added the Chore Miscellaneous chores to maintain the project label Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore Miscellaneous chores to maintain the project Testing Something can be verified
Projects
Status: To do
Development

No branches or pull requests

1 participant