Skip to content

Fix a warning and add resolve_host test suite#230

Merged
manugarg merged 2 commits intomainfrom
resolve_host_fix
Feb 8, 2026
Merged

Fix a warning and add resolve_host test suite#230
manugarg merged 2 commits intomainfrom
resolve_host_fix

Conversation

@manugarg
Copy link
Copy Markdown
Owner

@manugarg manugarg commented Feb 8, 2026

Added comprehensive tests for resolve_host function:

  • test_resolve_host.c: Basic functional tests
  • test_multi_ip.c: Multiple IP handling tests
  • test_buffer_safety.c: Memory safety with canaries
  • test_edge_cases.c: Comprehensive edge case tests

Tests run in CI on all platforms (Linux, macOS, Windows) to verify:

  • IPv4/IPv6 resolution correctness
  • Buffer safety (no overruns)
  • Semicolon separation formatting
  • max_results limiting
  • Error handling

manugarg and others added 2 commits February 8, 2026 12:00
Added comprehensive tests for resolve_host function:
- test_resolve_host.c: Basic functional tests
- test_multi_ip.c: Multiple IP handling tests
- test_buffer_safety.c: Memory safety with canaries
- test_edge_cases.c: Comprehensive edge case tests

Tests run in CI on all platforms (Linux, macOS, Windows) to verify:
- IPv4/IPv6 resolution correctness
- Buffer safety (no overruns)
- Semicolon separation formatting
- max_results limiting
- Error handling

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add conditional includes for Windows (winsock2.h) vs Unix (sys/socket.h)
- Link against ws2_32 library on Windows
- Tests now compile and run on all platforms

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 8, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@manugarg manugarg merged commit 8b6961c into main Feb 8, 2026
28 of 30 checks passed
@manugarg manugarg deleted the resolve_host_fix branch February 8, 2026 20:23
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.

1 participant