summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTomas Glozar <tglozar@redhat.com>2026-05-28 12:32:53 +0200
committerTomas Glozar <tglozar@redhat.com>2026-05-28 13:02:48 +0200
commit244d0cbff2efa13931115784e5dc4d1270a04ec7 (patch)
tree3a679f17c3adab9ea147eda742c520323716a355 /include/linux
parent5d9af63e80b5a202e69ce5bcf54af320e46f397a (diff)
rtla/tests: Add unit tests for _parse_args() functions
Add a test suite for the _parse_args() function of each tool that checks the params structures (struct common_params, struct osnoise_params, struct timerlat_params) returned by them for correctness. One test case is added per option, as well as a few special cases for tricky combinations of options. Test cases are ordered the same as the option arrays and help message to allow easy checking of whether all options are covered. This should help clarify what the proper command line behavior of RTLA is in case there are holes in the documentation and verify that the intended behavior is implemented correctly. A few necessary changes to the unit tests were done as part of this commit: - Unit tests now also link to libsubcmd and its dependencies. - A new global variable in_unit_test is added to RTLA's CLI interface, causing it to skip check for root if running in unit tests. This allows the CLI unit tests to run as non-root, like existing unit tests. There is quite a lot of duplication, some of it is mitigated with macros, but partially it is intentional so that future changes in behavior are tracked across tools. Link: https://lore.kernel.org/r/20260528103254.2990068-6-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions