rtla: Add tests for option parsing with attached arguments
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | rtla/timerlat: Add tests for option parsing with attached argumentstools/ | +10 | 0 replies | |
| 2/2 | rtla: Add tests for option parsing with attached argumentstools/ tools/ tools/ | +36 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] rtla: Add tests for option parsing with attached arguments
This patch series adds comprehensive tests to verify that short options with attached numeric arguments (e.g., -p100) work correctly across all rtla commands.
These tests complement Tomas Glozar's fix "rtla: Fix parsing of multi-character short options" which resolves the issue where options like -p100 were incorrectly parsed as multiple separate options due to getopt_long() being called twice.
The tests verify four option formats for each command:
-p 100 (short with space) -p100 (short attached - previously broken) --period=100 (long with equals) --period 100 (long with space)
Commands tested:
- timerlat hist and top
- osnoise hist and top
- hwnoise
All 20 tests pass with Tomas's fix applied, confirming the issue is resolved and preventing future regressions. These tests will continue to work when rtla transitions to libsubcmd in the future, ensuring this functionality remains correct across parsing implementations.
Note: Patch 1/2 is a resend of the timerlat hist tests sent previously. Patch 2/2 adds tests for the remaining rtla commands.
John Kacur (2):
rtla/timerlat: Add tests for option parsing with attached arguments
rtla: Add tests for option parsing with attached arguments
tools/tracing/rtla/tests/hwnoise.t | 10 ++++++++++ tools/tracing/rtla/tests/osnoise.t | 18 ++++++++++++++++++ tools/tracing/rtla/tests/timerlat.t | 18 ++++++++++++++++++ 3 files changed, 46 insertions(+)
Signature · 1 line
2.54.0