summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTomas Glozar <tglozar@redhat.com>2026-05-28 12:32:54 +0200
committerTomas Glozar <tglozar@redhat.com>2026-05-28 13:02:48 +0200
commit596a9bed0aec60490dffd85bd1865430ce298eba (patch)
tree221d3ba02d3776f395c3979c29428044b26df3a9 /include/linux
parent244d0cbff2efa13931115784e5dc4d1270a04ec7 (diff)
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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions