From: John Kacur <jkacur@redhat.com>
To: linux-trace-kernel@vger.kernel.org
Cc: Steven Rostedt <rostedt@goodmis.org>,
Tomas Glozar <tglozar@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] rtla: Add tests for option parsing with attached arguments
Date: Tue, 2 Jun 2026 11:52:07 -0400 [thread overview]
Message-ID: <20260602155210.60439-1-jkacur@redhat.com> (raw)
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.
Signed-off-by: John Kacur <jkacur@redhat.com>
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(+)
--
2.54.0
next reply other threads:[~2026-06-02 15:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 15:52 John Kacur [this message]
2026-06-02 15:52 ` [PATCH 1/2] rtla/timerlat: Add tests for option parsing with attached arguments John Kacur
2026-06-02 15:52 ` [PATCH 2/2] rtla: " John Kacur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260602155210.60439-1-jkacur@redhat.com \
--to=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglozar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox