| #
5daa3c4f |
| 27-May-2026 |
Tomas Glozar <tglozar@redhat.com> |
rtla/tests: Add unit tests for -A/--aligned option
Add both parse_args() and opt_* tests for the newly added -A/--aligned option.
Assisted-by: Claude:claude-4.5-opus-high-thinking Link: https://lor
rtla/tests: Add unit tests for -A/--aligned option
Add both parse_args() and opt_* tests for the newly added -A/--aligned option.
Assisted-by: Claude:claude-4.5-opus-high-thinking Link: https://lore.kernel.org/r/20260527144928.2944472-2-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
show more ...
|
| #
596a9bed |
| 28-May-2026 |
Tomas Glozar <tglozar@redhat.com> |
rtla/tests: Add unit tests for CLI option callbacks
In addition to testing all tool_parse_args() functions, test also all callbacks used for parsing custom option formats.
The callbacks represent a
rtla/tests: Add unit tests for CLI option callbacks
In addition to testing all tool_parse_args() functions, test also all callbacks used for parsing custom option formats.
The callbacks represent a middle layer between the parsing functions and utility functions dedicated to checking specific argument formats, for example, scheduling class and duration. Callback tests are run before parsing functions to make sure any issue in the former is reported before it is encountered through the latter.
Tests verify both successful parsing and proper rejection of invalid inputs (via exit tests). To enable testing static callbacks, a pragma once guard is added to timerlat.h for safe inclusion by cli_p.h.
Add dependency of UNIT_TESTS_IN on LIBSUBCMD_INCLUDES, as the new test file tests/unit/cli_opt_callback.c includes cli_p.h which includes subcmd/parse-options.h.
Link: https://lore.kernel.org/r/20260528103254.2990068-7-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
show more ...
|