Branch: refs/heads/stable1-proposed Home: https://github.com/kronosnet/kronosnet Commit: 21c7fee6e003da6a03c729c3ed6f8d482d568a76 https://github.com/kronosnet/kronosnet/commit/21c7fee6e003da6a03c729c3ed6f8d... Author: Christine Caulfield ccaulfie@redhat.com Date: 2026-06-12 (Fri, 12 Jun 2026)
Changed paths: M libnozzle/tests/api_nozzle_add_ip.c M libnozzle/tests/api_nozzle_close.c M libnozzle/tests/api_nozzle_del_ip.c M libnozzle/tests/api_nozzle_get_fd.c M libnozzle/tests/api_nozzle_get_handle_by_name.c M libnozzle/tests/api_nozzle_get_ips.c M libnozzle/tests/api_nozzle_get_mac.c M libnozzle/tests/api_nozzle_get_mtu.c M libnozzle/tests/api_nozzle_get_name_by_handle.c M libnozzle/tests/api_nozzle_open.c M libnozzle/tests/api_nozzle_run_updown.c M libnozzle/tests/api_nozzle_set_down.c M libnozzle/tests/api_nozzle_set_mac.c M libnozzle/tests/api_nozzle_set_mtu.c M libnozzle/tests/api_nozzle_set_up.c M libnozzle/tests/int_execute_bin_sh_command.c M libnozzle/tests/test-common.h
Log Message: ----------- nozzle: Introduce test macros similar to libknet
Add comprehensive test macros to test-common.h, similar to those used in libknet tests: - FAIL_ON_ERR: Fail if function returns error - FAIL_ON_SUCCESS: Negative test - expect failure with specific errno - FAIL_ON_NULL/FAIL_ON_NOT_NULL: For pointer-returning functions - FAIL_ON_NONZERO/FAIL_ON_ZERO: For comparisons - FAIL_ON_ERR_ONLY: For functions returning -1 on error - FAIL_ON_CMD: For execute_bin_sh_command and similar - FAIL_ON_CMD_SUCCESS: Negative test for commands
These macros: - Reduce code duplication and improve readability - Print descriptive failure messages with line numbers - Handle errno correctly for debugging - Automatically clean up via 'goto out_clean' pattern
All test files have been converted to use these macros, significantly reducing test code size (from 1280 to ~600 lines net) while improving clarity and error reporting.
Also fixed Solaris-specific test issues where interface state checks aren't possible - these now skip the check rather than fail.
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications