Branch: refs/heads/test-improvements Home: https://github.com/kronosnet/kronosnet Commit: 2d5444995289f3e648cf7fc8c0e8319cc0ab9799 https://github.com/kronosnet/kronosnet/commit/2d5444995289f3e648cf7fc8c0e831... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths: M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- [tests] Add runtime log filter callback infrastructure
Add thread-safe log filter callback mechanism for runtime pattern matching in test logs. The log thread invokes registered callbacks for each log line, allowing tests to detect specific messages without parsing log files.
Features: - install_log_filter() to register/unregister callbacks - check_log_pattern_found() to query if pattern was matched - Thread-safe via mutex protection - Callback receives logfd for use with log_test() facility
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 06488d6bc343b898abace4977547c24d482763f8 https://github.com/kronosnet/kronosnet/commit/06488d6bc343b898abace4977547c2... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths: M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- [tests] Add packet injection helper for RX validation testing
Add inject_packet() helper to construct and inject packets directly into link sockets for testing RX thread validation logic without requiring network-level packet manipulation.
Supports: - DATA packets with configurable fragmentation fields - PING packets with configurable link_id - Controlled sequence numbers to avoid deduplication - Tests can forge invalid packets to verify rejection logic
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: cc36e2096d007cd58c883e9544832367450a314e https://github.com/kronosnet/kronosnet/commit/cc36e2096d007cd58c883e95448323... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths: M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_loopback.c
Log Message: ----------- [tests] Use FAIL_ON_* macros consistently in send tests
Replace manual if statement error checking with FAIL_ON_SUCCESS and FAIL_ON_ERR macros for consistency with the rest of the test suite.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: dfab4657fd4ea5ae2a80b774cb8e6d68f63881a5 https://github.com/kronosnet/kronosnet/commit/dfab4657fd4ea5ae2a80b774cb8e6d... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths: M libknet/tests/test-common.c
Log Message: ----------- [tests] Fix parallel port allocation race in _ts_knet_handle_join_nodes
The existing port allocation used predictable node ID-based calculations, causing EADDRINUSE errors when tests run in parallel and multiple nodes try to bind the same port simultaneously.
Implement two-phase port allocation: - Phase 1: Each node allocates ports by configuring links to a temporary peer, letting _ts_knet_link_set_config find available ports with proper EADDRINUSE retry logic - Phase 2: Reconfigure each link to its actual destination peer, reusing the src_addr already bound in Phase 1
Requires clearing the configured flag between phases (protected by global_rwlock) to allow reconfiguring to a different host_id while keeping the socket bound.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Compare: https://github.com/kronosnet/kronosnet/compare/2d5444995289%5E...dfab4657fd4...
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications