Branch: refs/heads/stable1-proposed Home: https://github.com/kronosnet/kronosnet Commit: 72571ed61031018fde5870be55b2af9c7198443a https://github.com/kronosnet/kronosnet/commit/72571ed61031018fde5870be55b2af... Author: Christine Caulfield ccaulfie@redhat.com Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths: M libnozzle/tests/api_nozzle_prefix_validation.c
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