Branch: refs/heads/stable1-proposed Home: https://github.com/kronosnet/kronosnet Commit: d02d1faa79a230d8ffd5e50b9f5a54ba92406a15 https://github.com/kronosnet/kronosnet/commit/d02d1faa79a230d8ffd5e50b9f5a54... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am M libknet/tests/api-check.mk M libknet/tests/api_knet_addrtostr.c M libknet/tests/api_knet_get_compress_list.c M libknet/tests/api_knet_get_crypto_list.c M libknet/tests/api_knet_get_transport_id_by_name.c M libknet/tests/api_knet_get_transport_list.c M libknet/tests/api_knet_get_transport_name_by_id.c M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_new_limit.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_get_loglevel_id.c M libknet/tests/api_knet_log_get_loglevel_name.c M libknet/tests/api_knet_log_get_subsystem_id.c M libknet/tests/api_knet_log_get_subsystem_name.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/api_knet_strtoaddr.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/int_links_acl_ip.c M libknet/tests/int_timediff.c M libknet/tests/knet_bench.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: migrate to unified logging infrastructure
Convert all 86 tests to start_logging/stop_logging pattern with timestamped [testsuite] markers. Replace printf() in test functions with log_test(). Remove old logging infrastructure and rename macros to standard names.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 87e481eeb5485cf609ff32c052bf1e14de8e1757 https://github.com/kronosnet/kronosnet/commit/87e481eeb5485cf609ff32c052bf1e... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_addrtostr.c M libknet/tests/api_knet_get_compress_list.c M libknet/tests/api_knet_get_crypto_list.c M libknet/tests/api_knet_get_transport_id_by_name.c M libknet/tests/api_knet_get_transport_list.c M libknet/tests/api_knet_get_transport_name_by_id.c M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_new_limit.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_get_loglevel_id.c M libknet/tests/api_knet_log_get_loglevel_name.c M libknet/tests/api_knet_log_get_subsystem_id.c M libknet/tests/api_knet_log_get_subsystem_name.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/api_knet_strtoaddr.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/int_links_acl_ip.c M libknet/tests/int_timediff.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: standardize test result output with TEST_EXIT macro
Add [PASS]/[FAIL]/[SKIP]/[ERROR] markers to all test output. Rename CLEAN_EXIT to TEST_EXIT_CLEAN for clarity.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: d56f6b10259451578209cfaab5543a70c85a8ec2 https://github.com/kronosnet/kronosnet/commit/d56f6b10259451578209cfaab5543a... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_new.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/knet_bench.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: rename knet_* test helpers to _ts_knet_* to avoid namespace collision
Rename test suite helpers that wrap libknet API to use _ts_ prefix (test suite) to clearly distinguish them from the public libknet API functions: - knet_handle_start → _ts_knet_handle_start - knet_handle_stop_everything → _ts_knet_handle_stop_everything - knet_handle_start_nodes → _ts_knet_handle_start_nodes - knet_handle_join_nodes → _ts_knet_handle_join_nodes - knet_handle_disconnect_links → _ts_knet_handle_disconnect_links - knet_handle_reconnect_links → _ts_knet_handle_reconnect_links - _knet_link_set_config → _ts_knet_link_set_config
This prevents confusion between test infrastructure and library API.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: a961c530dc5bb837bd123a79ee3ac4974da89457 https://github.com/kronosnet/kronosnet/commit/a961c530dc5bb837bd123a79ee3ac4... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/knet_bench.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: improve test infrastructure and fix issues
Standardize test_sleep() to take logfd instead of knet_h. Fix knet_bench infrastructure. Remove redundant TESTNODES definitions.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 15f7bc8cb3ba4163aab1a4f18054ce3205cf93bc https://github.com/kronosnet/kronosnet/commit/15f7bc8cb3ba4163aab1a4f18054ce... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_handle_add_datafd.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_compress.c M libknet/tests/api_knet_handle_crypto.c M libknet/tests/api_knet_handle_crypto_rx_clear_traffic.c M libknet/tests/api_knet_handle_crypto_set_config.c M libknet/tests/api_knet_handle_crypto_use_config.c M libknet/tests/api_knet_handle_enable_access_lists.c M libknet/tests/api_knet_handle_enable_filter.c M libknet/tests/api_knet_handle_enable_pmtud_notify.c M libknet/tests/api_knet_handle_enable_sock_notify.c M libknet/tests/api_knet_handle_free.c M libknet/tests/api_knet_handle_get_channel.c M libknet/tests/api_knet_handle_get_datafd.c M libknet/tests/api_knet_handle_get_stats.c M libknet/tests/api_knet_handle_get_transport_reconnect_interval.c M libknet/tests/api_knet_handle_pmtud_get.c M libknet/tests/api_knet_handle_pmtud_getfreq.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_handle_pmtud_setfreq.c M libknet/tests/api_knet_handle_remove_datafd.c M libknet/tests/api_knet_handle_set_transport_reconnect_interval.c M libknet/tests/api_knet_handle_setfwd.c M libknet/tests/api_knet_handle_setprio_dscp.c M libknet/tests/api_knet_host_add.c M libknet/tests/api_knet_host_enable_status_change_notify.c M libknet/tests/api_knet_host_get_host_list.c M libknet/tests/api_knet_host_get_id_by_host_name.c M libknet/tests/api_knet_host_get_name_by_host_id.c M libknet/tests/api_knet_host_get_policy.c M libknet/tests/api_knet_host_get_status.c M libknet/tests/api_knet_host_remove.c M libknet/tests/api_knet_host_set_name.c M libknet/tests/api_knet_host_set_policy.c M libknet/tests/api_knet_link_add_acl.c M libknet/tests/api_knet_link_clear_acl.c M libknet/tests/api_knet_link_clear_config.c M libknet/tests/api_knet_link_get_config.c M libknet/tests/api_knet_link_get_enable.c M libknet/tests/api_knet_link_get_link_list.c M libknet/tests/api_knet_link_get_ping_timers.c M libknet/tests/api_knet_link_get_pong_count.c M libknet/tests/api_knet_link_get_priority.c M libknet/tests/api_knet_link_get_status.c M libknet/tests/api_knet_link_insert_acl.c M libknet/tests/api_knet_link_rm_acl.c M libknet/tests/api_knet_link_set_config.c M libknet/tests/api_knet_link_set_enable.c M libknet/tests/api_knet_link_set_ping_timers.c M libknet/tests/api_knet_link_set_pong_count.c M libknet/tests/api_knet_link_set_priority.c M libknet/tests/api_knet_log_get_loglevel.c M libknet/tests/api_knet_log_set_loglevel.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: improve error handling and use named constants
Add FAIL_ON_SUCCESS macro for consistent API error checking. Consolidate timeout handling with adjust_timeout_for_valgrind(). Replace magic numbers with TEST_TIMEOUT_* and TEST_PORT_* constants.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 1ca636f9b4444437c76610fd66d5a4a545511c47 https://github.com/kronosnet/kronosnet/commit/1ca636f9b4444437c76610fd66d5a4... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_addrtostr.c M libknet/tests/api_knet_get_compress_list.c M libknet/tests/api_knet_get_crypto_list.c M libknet/tests/api_knet_get_transport_list.c M libknet/tests/api_knet_strtoaddr.c M libknet/tests/test-common.h
Log Message: ----------- tests: add NOCLEAN macro variants for tests without knet handles
Add FAIL_ON_ERR_NOCLEAN and FAIL_ON_SUCCESS_NOCLEAN macros for tests that don't create knet handles and don't need cleanup infrastructure.
Convert 5 API tests to use new macros (11 error checks total): - api_knet_addrtostr.c (4 checks) - api_knet_strtoaddr.c (4 checks) - api_knet_get_compress_list.c (1 check) - api_knet_get_crypto_list.c (1 check) - api_knet_get_transport_list.c (1 check)
Reduces test code by 37 lines and improves consistency with other tests.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 2f91dee638630984fbd3672bcf5a9a43704a440e https://github.com/kronosnet/kronosnet/commit/2f91dee638630984fbd3672bcf5a9a... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/Makefile.am M libknet/crypto.c M libknet/crypto_nss.c M libknet/libknet.h M libknet/libknet_exported_syms M libknet/tests/api-check.mk A libknet/tests/api_knet_get_crypto_cipher_list.c A libknet/tests/api_knet_get_crypto_hash_list.c M man/Makefile.am
Log Message: ----------- Add API to enumerate supported cipher modes and hash algorithms
Implements issue #478 by introducing two new API functions: - knet_get_crypto_cipher_list(): Returns AES cipher modes (CBC/CTR) supported across all crypto backends - knet_get_crypto_hash_list(): Returns hash algorithms supported across all crypto backends
Both functions return the intersection of capabilities across OpenSSL, NSS, and libgcrypt backends. Applications can reliably use any returned cipher/hash combination regardless of which crypto module is loaded.
The cipher list includes both OpenSSL-style hyphenated names (aes-128-cbc) and NSS/libgcrypt non-hyphenated names (aes128) as separate entries.
New structures: - knet_crypto_cipher_info: const char *name, const char *mode, int key_bits - knet_crypto_hash_info: const char *name, int hash_bits
Updated NSS parser to accept hyphenated CBC cipher names (aes-128-cbc, aes-192-cbc, aes-256-cbc) in addition to non-hyphenated variants.
Includes comprehensive tests verifying all returned ciphers and hashes work with all three crypto backends.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 662b1b0aeb75d79f330c932807671b3e2046107b https://github.com/kronosnet/kronosnet/commit/662b1b0aeb75d79f330c932807671b... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/api_knet_get_crypto_cipher_list.c M libknet/tests/api_knet_get_crypto_hash_list.c M libknet/tests/api_knet_handle_clear_stats.c M libknet/tests/api_knet_handle_pmtud_set.c M libknet/tests/api_knet_recv.c M libknet/tests/api_knet_send.c M libknet/tests/api_knet_send_compress.c M libknet/tests/api_knet_send_crypto.c M libknet/tests/api_knet_send_loopback.c M libknet/tests/api_knet_send_sync.c M libknet/tests/fun_acl_check.c M libknet/tests/fun_config_crypto.c M libknet/tests/fun_pmtud_crypto.c M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: cleanup and add comprehensive documentation
Remove flush_logs(), dead code, and unused FILE parameters. Add detailed documentation to test-common.h for all macros and helpers. Port crypto enumeration API tests to new infrastructure.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 47374edb6ecf6f84e6008ab33fe21e4dae10d608 https://github.com/kronosnet/kronosnet/commit/47374edb6ecf6f84e6008ab33fe21e... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/test-common.c M libknet/tests/test-common.h
Log Message: ----------- tests: export find_plugins_path() for rust bindings
The find_plugins_path() function must be non-static because it is used by the rust test suite (libknet/bindings/rust/tests/src/bin/set_plugin_path.c).
Changes: - Remove static qualifier from find_plugins_path() in test-common.c - Add declaration to test-common.h with updated signature (int logfd) - Update rust test code to pass STDOUT_FILENO as logfd parameter
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 7555f2c691562c0abb2e8e7de1c8a840b2dce947 https://github.com/kronosnet/kronosnet/commit/7555f2c691562c0abb2e8e7de1c8a8... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 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: 6f6863d8d4348cec68d2cb6eaa7b06b1537caaa5 https://github.com/kronosnet/kronosnet/commit/6f6863d8d4348cec68d2cb6eaa7b06... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 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: fc9f3b5f3d7435e0d7a5b8b405785f447a7af1f8 https://github.com/kronosnet/kronosnet/commit/fc9f3b5f3d7435e0d7a5b8b405785f... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: 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: 08029d9740817f33bc475c9db5253d8b9ab137b6 https://github.com/kronosnet/kronosnet/commit/08029d9740817f33bc475c9db5253d... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 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
Commit: 29c35d3eb58689477ba2a49e6206ad9e914018f1 https://github.com/kronosnet/kronosnet/commit/29c35d3eb58689477ba2a49e6206ad... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/knet_bench.c
Log Message: ----------- [tests] improve input validation in knet_bench test tool
Replace atoi() with safe_atoi() helper that uses strtol() for proper error detection. Improves developer experience with better error messages.
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 1ffb2b44c4bc05f3b3722e4d7bd25d73a74a9040 https://github.com/kronosnet/kronosnet/commit/1ffb2b44c4bc05f3b3722e4d7bd25d... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am A libknet/tests/int_decompress_bufsize.c M libknet/tests/test-common.c M libknet/tests/test-common.h M libknet/threads_rx.c
Log Message: ----------- libknet: add decompression buffer size validation
Add validation to reject packets where decompressed size exceeds KNET_DATABUFSIZE, preventing buffer overflows in decompression.
Add int_decompress_bufsize test that verifies packets with oversized decompressed payloads are properly rejected with appropriate logging.
Backport notes: - Adapted for onwire protocol v0 (removed onwire_v1.h include) - Updated knet_handle_add_datafd call to 3-parameter stable1 API - Added zlib_LIBS to test LDADD for direct zlib function calls - Updated inject_packet to use KNET_HEADER_VERSION constant
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: ec943ab1a07271ce2750ccd54b8a54cc36fb5e60 https://github.com/kronosnet/kronosnet/commit/ec943ab1a07271ce2750ccd54b8a54... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/host.c
Log Message: ----------- libknet: fix defragmentation buffer reclamation logic
Fix bug in the defragmentation buffer reclamation logic that prevents efficient memory management:
Window calculation was using the old received sequence number (dst_seq_num) instead of the current packet's sequence number (seq_num) to calculate the valid buffer window. This caused buffers to be reclaimed based on stale sequence information, potentially freeing buffers that should still be valid or keeping buffers that should be reclaimed.
The valid sequence number window is calculated based on the current packet's seq_num to ensure proper reclamation of stale defragmentation buffers.
Backport notes: - In stable1, KNET_DEFRAG_BUFFERS is the actual allocated count (32), equivalent to host->allocated_defrag_bufs in main - stable1 uses defrag_buf (singular) instead of defrag_bufs (plural) - _reclaim_old_defrag_bufs doesn't take knet_h parameter in stable1
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: df8b87afda0689ffd891aaa213d3655470b3ee83 https://github.com/kronosnet/kronosnet/commit/df8b87afda0689ffd891aaa213d365... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/host.c
Log Message: ----------- libknet: fix sequence number wraparound calculation in defragmentation
The distance calculation between sequence numbers was incorrect when wraparound occurred. The formula was backwards: it subtracted in the wrong direction and didn't account for the +1 needed for modular arithmetic.
This caused incorrect buffer reclamation decisions near the SEQ_MAX boundary.
Practical examples (SEQ_MAX = 65535):
Example 1 - Normal case (no wraparound): Last packet: dst_seq_num = 1000 New packet: seq_num = 1005 Expected distance: 5
BEFORE (wrong): seq_dist = dst_seq_num - seq_num = 1000 - 1005 = -5 (negative!)
AFTER (correct): seq_dist = seq_num - dst_seq_num = 1005 - 1000 = 5
Example 2 - Wraparound case: Last packet: dst_seq_num = 65534 New packet: seq_num = 3 (wrapped around) Expected distance: 5 (65534→65535→0→1→2→3)
BEFORE (wrong): seq_dist = (SEQ_MAX - seq_num) + dst_seq_num seq_dist = (65535 - 3) + 65534 = 131066 (huge wrong number!)
AFTER (correct): seq_dist = (SEQ_MAX - dst_seq_num) + seq_num + 1 seq_dist = (65535 - 65534) + 3 + 1 = 5
The +1 accounts for the transition from 65535→0 being one step, not zero.
Verification that circular buffer cleaning is not broken:
The seq_dist value is used to determine whether the new packet is: a) Within the circular buffer window (seq_dist < KNET_CBUFFER_SIZE) b) Far enough to require full buffer clear (seq_dist > threshold) c) Should trigger incremental cleaning (fall through case)
Test case 1 - Normal sequential packet: dst_seq_num = 1000, seq_num = 1005, expected distance = 5
BEFORE: seq_dist = -5 (unsigned overflow ~65530) → Incorrectly clears entire buffer for normal sequential packets!
AFTER: seq_dist = 5 → Correctly identifies packet as within buffer window, no clearing needed
Test case 2 - Wraparound (close distance): dst_seq_num = 65534, seq_num = 3, expected distance = 5
BEFORE: seq_dist = 131066 → Falls through to circular buffer cleaning code incorrectly
AFTER: seq_dist = 5 → Correctly identifies packet as within buffer window
Test case 3 - Large jump requiring buffer clear: dst_seq_num = 1000, seq_num = 50000, expected distance = 49000
BEFORE: seq_dist = -49000 (unsigned ~16536) → Clears buffer (correct by accident)
AFTER: seq_dist = 49000 → Clears buffer (correct by design)
The circular buffer cleaning code (lines 673-684) uses seq_num and dst_seq_num directly via modulo operations to find buffer positions. It does not use seq_dist for position calculations, only for the threshold check to determine whether to run. The fix corrects the threshold logic without affecting the position calculations.
Signed-off-by: Fabio M. Di Nitto fdinitto@redhat.com Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 97d059c2c7424b111c61d0c2c9432e24be963597 https://github.com/kronosnet/kronosnet/commit/97d059c2c7424b111c61d0c2c9432e... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am A libknet/tests/int_seq_wraparound_stress.c
Log Message: ----------- [tests] add comprehensive sequence number wraparound stress test
Add new int_seq_wraparound_stress_test that validates sequence number wraparound handling and defragmentation buffer management under realistic packet loss scenarios.
Test scenarios:
1. Normal sequential with packet loss - validates basic packet handling with gaps in sequence numbers. Sends seq 1000-1006 with some complete (both fragments), some lost (no fragments), and some incomplete (only one fragment). Verifies only complete packets are delivered (4/7).
2. Wraparound boundary with packet loss - validates wraparound crossing from seq 65533 to seq 4 with mixed complete/incomplete/lost packets. Tests special case where sequence numbers wrap from SEQ_MAX (65535) to 0. Verifies 5 complete packets delivered correctly across boundary.
3. Large sequence jump (> KNET_CBUFFER_SIZE) - validates buffer clearing logic when sequence gap exceeds circular buffer size. Sends seq 5000, then jumps to 10000 (5000 packet gap > KNET_CBUFFER_SIZE 4096), triggering buffer reclamation. Verifies all complete packets delivered.
4. Out-of-order fragment delivery - validates fragment assembly when fragments arrive in reverse order (frag 2 before frag 1) for same sequence number. Sends 3 packets with mixed fragment ordering and verifies all packets assembled correctly regardless of fragment order.
5. Out-of-order complete packet delivery - validates handling when complete packets arrive with out-of-order sequence numbers. Sends seq 1000, 1001, 999 (last one arrives late) and verifies all 3 packets are delivered.
6. Extreme packet loss beyond receive window - validates recovery from massive packet loss exceeding KNET_CBUFFER_SIZE. Creates incomplete packets at seq 30000-30002, then jumps to 35000 (5000 gap), tests buffer clearing and continued operation. Verifies 5 complete packets.
7. Wraparound with extreme packet loss - validates wraparound combined with massive loss. Sends seq 60000-60001, then jumps to 100-103 (gap = 5636 packets wrapping around + exceeding buffer size). Verifies buffer clearing across wraparound and 5 complete packets.
8. Wraparound stress with multiple cycles and duplicate detection - rapidly cycles through wraparound boundary (65530-65535-0-10) twice with different packet filters. First cycle sends packets where (seq % 3) != 0, second cycle sends packets where (seq % 3) != 1. Tests duplicate rejection and verifies only unique sequence numbers are delivered.
9. Fragment corruption across wraparound - validates protection against historical bug where fragments from different packet transmissions could be incorrectly mixed. Sends seq 5000 frag 1 filled with 'A', advances through complete wraparound (65536 sequences), sends seq 5000 frag 2 filled with 'B'. Verifies old fragment 1 was invalidated and no corrupted packet delivered (mixing A+B fragments).
10. Defragmentation buffer reclamation window calculation - validates _reclaim_old_defrag_bufs() correctly reclaims buffers outside current sequence window using seq_num (not dst_seq_num). Creates incomplete fragments at seq 100, 105, 110, 115, 120, then advances window to seq 150. Verifies buffers outside window (100-115) are reclaimed and buffer within window (120) is preserved.
11. Circular buffer clearing at boundaries - validates _seq_num_lookup correctly clears circular_buffer ranges in both wraparound (tail > head) and normal (tail <= head) cases. Test case 1: seq 3000 → 10 creates tail=3001 > head=10, should clear [3001..4095] and [0..10]. Test case 2: seq jump to 8191 creates tail=0 <= head=4095, should clear [0..4095].
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 5e11667b5324aaf775294807882754f87bb353d2 https://github.com/kronosnet/kronosnet/commit/5e11667b5324aaf775294807882754... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am A libknet/tests/int_defrag_edge_cases.c
Log Message: ----------- [tests] add defragmentation edge cases test suite
Add new int_defrag_edge_cases_test that validates critical defragmentation buffer management scenarios not covered by existing tests.
Test scenarios:
1. Last fragment arriving first - validates special buffer positioning at KNET_MAX_PACKET_SIZE - len offset, last_first flag handling, and fragment relocation when packet completes. Tests asymmetric MTU with fragments in order [3/3, 1/3, 2/3] and verifies data integrity across all fragments (280 bytes total with distinct payloads 'A', 'B', 'C').
2. Buffer exhaustion and reclamation - validates window-based reclamation when all 32 defrag buffers are filled with incomplete packets. Sends new complete packet with distant sequence number (9000 vs 2000-2031) triggering reclamation of all out-of-window buffers. Verifies data integrity with no corruption from old buffer data in new packet.
3. Fragment data overwrite protection - validates correct assembly of large fragmented packets without buffer overflow. Test case 1 sends 100 fragments × 500 bytes (50,000 bytes total), test case 2 sends 50 fragments × 1,300 bytes (65,000 bytes approaching KNET_MAX_PACKET_SIZE). Each fragment filled with its index number and verified on assembly.
4. Duplicate fragment handling - validates that duplicate fragments (same sequence number and fragment index) are silently rejected without corrupting the buffer. Sends frag 1/2, frag 1/2 (duplicate with different data), frag 2/2 and verifies only one correct packet is delivered with original fragment data preserved.
5. Maximum realistic fragments - validates fragment map can handle high fragment counts (100 fragments, 500 bytes each = 50,000 bytes total). PCKT_FRAG_MAX (255) is theoretical limit, but realistic max is determined by min_mtu. Tests worst-case scenario with min MTU ~550 bytes.
6. Single fragment packets (1/1) - validates degenerate case where packets are marked as fragmented but contain only one fragment. Sends 5 packets of 200 bytes each, all marked as 1/1, and verifies correct delivery without unnecessary defragmentation overhead.
7. Interleaved fragment assembly across wraparound - validates concurrent assembly of multiple fragmented packets with fragments arriving in interleaved order across sequence number wraparound boundary. Sends 4 packets (seq 65534, 65535, 0, 1) with all first fragments, then completes them in reverse order (1→0→65535→65534). Verifies all packets received correctly with no cross-contamination between defrag buffers.
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: caa319f422eb889c26d9ec2907cec54ccccd2e27 https://github.com/kronosnet/kronosnet/commit/caa319f422eb889c26d9ec2907cec5... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/tests/Makefile.am A libknet/tests/int_buffer_management.c
Log Message: ----------- [tests] add defragmentation buffer reuse test
Add new int_buffer_management_test that validates defragmentation buffer reuse after reclamation to prevent data leakage.
Test scenario:
Buffer reuse after reclamation - validates that reclaimed buffers are properly cleared before reuse, preventing data leakage. Sends incomplete packet at seq 5000 filled with 'X', then complete packet at seq 10000 (distance 5000 > KNET_CBUFFER_SIZE 4096) triggering reclamation. Verifies new packet contains only 'Z' with no trace of 'X', then reuses same buffer with new packet 'M'+'N' and confirms no leakage.
Backport notes: - Tests 1 and 3 from main (dynamic buffer growth/shrinking) are not applicable to stable1 which has fixed KNET_DEFRAG_BUFFERS allocation - Only test 2 (buffer reuse after reclamation) is relevant and backported - This test validates critical buffer clearing behavior that applies equally to both stable1 and main
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: f7e03f23d2390b4d6bab1e2adc2c9ad6063b6e07 https://github.com/kronosnet/kronosnet/commit/f7e03f23d2390b4d6bab1e2adc2c9a... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M libknet/handle_api.c M libknet/libknet.h M libknet/tests/api_knet_handle_add_datafd.c
Log Message: ----------- libknet: add comprehensive file descriptor validation in knet_handle_add_datafd
Add validation to reject unsupported file descriptor types that would fail at runtime. Reject user-provided AF_UNIX socketpairs (knet needs both ends but API only accepts one), all pipes (bidirectional flow requires two fds), and unconnected/unbound sockets.
Add comprehensive test coverage with both blacklist (rejection) and whitelist (acceptance) tests for various fd types including a SOCK_DGRAM test that validates knet I/O by sending through knet_send and receiving on the peer socket.
Platform-specific handling: - Linux: Character devices fail with EPERM at epoll stage - Older BSD (13/14): Character devices fail with ENODEV at kqueue stage - Newer BSD (15+) and Solaris: Character devices accepted
Signed-off-by: Fabio M. Di Nitto fabbione@kronosnet.org Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Commit: 47b98b7309304c1a649e9b6af9a0ce0ed52ed844 https://github.com/kronosnet/kronosnet/commit/47b98b7309304c1a649e9b6af9a0ce... Author: Fabio M. Di Nitto fdinitto@redhat.com Date: 2026-06-06 (Sat, 06 Jun 2026)
Changed paths: M CLAUDE.md M README M libknet/libknet.h M libknet/transport_common.c
Log Message: ----------- libknet: use SOCK_DGRAM for internal socketpairs
Change _init_socketpair to use SOCK_DGRAM instead of SOCK_SEQPACKET. SOCK_DGRAM provides atomic message boundaries without requiring MSG_EOR flags.
FreeBSD 15+ changed SEQPACKET to require MSG_EOR for record boundaries, which has critical issues: - sendmsg(..., MSG_EOR) can perform partial writes on FreeBSD - knet's receive path uses readv() which cannot check MSG_EOR flags
Update documentation: - API docs now specify SOCK_DGRAM socketpair creation when datafd=0 - README and CLAUDE.md require net.local.dgram.maxdgram=131072 on FreeBSD (default is 8192 bytes, insufficient for KNET_MAX_PACKET_SIZE + ancillary data)
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/0432292e6a15...47b98b730930
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications