From: Steven Rostedt <rostedt@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: "John Warthog9 Hawley" <warthog9@kernel.org>,
Dhaval Giani <dhaval.giani@gmail.com>,
Greg KH <gregkh@linuxfoundation.org>
Subject: [PATCH 0/5] ktest.pl: Enhancements for 6.17
Date: Fri, 18 Jul 2025 16:18:40 -0400 [thread overview]
Message-ID: <20250718201840.714067501@kernel.org> (raw)
Some ktest.pl improvements:
- Add new -D option that allows to override variables and options
For example:
./ktest.pl -DPATCH_START:=HEAD~1 -DOUTPUT_DIR=/work/build/urgent config
The above sets the variable "PATCH_START" to HEAD~1 and the OUTPUT_DIR
option to "/work/build/urgent".
This is useful because currently the only way to make a slight change to a
config file is by modifying that config file. For one time changes, this
can be annoying. Having a way to do a one time override from the command
line simplifies the workflow.
Temp variables (PATCH_START) will override every temp variable in the
config file, whereas options will act like a normal OVERRIDE option and
will only affect the session they define.
-DBUILD_OUTPUT=/work/git/linux.git
Replaces the default BUILD_OUTPUT option.
'-DBUILD_OUTPUT[2]=/work/git/linux.git'
Only replaces the BUILD_OUTPUT variable for test #2.
- If an option contains itself, just drop it instead of going into an
infinite loop and failing to parse (it doesn't crash, it detects the
recursion after 100 iterations anyway).
Some configs may define a variable with the same name as the option:
ADD_CONFIG := $(ADD_CONFIG)
But if the option doesn't exist, it the above will fail to parse. In these
cases, just ignore evaluating the option inside the definition of another
option if it has the same name.
- Display the BUILD_DIR and OUTPUT_DIR options at the start of every test
It is useful to know which kernel source and what destination a test is
using when it starts, in case a mistake is made. This makes it easier to
abort the test if the wrong source or destination is being used instead of
waiting until the test completes.
Steven Rostedt (5):
ktest.pl: Add -D option to override options
ktest.pl: Allow command option -D to override temp variables
ktest.pl: Have -D option work without a space
ktest.pl: Prevent recursion of default variable options
ktest.pl: Always display BUILD_DIR and OUTPUT_DIR at the start of tests
----
tools/testing/ktest/ktest.pl | 83 ++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 80 insertions(+), 3 deletions(-)
next reply other threads:[~2025-07-18 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 20:18 Steven Rostedt [this message]
2025-07-18 20:18 ` [PATCH 1/5] ktest.pl: Add -D option to override options Steven Rostedt
2025-07-18 20:18 ` [PATCH 2/5] ktest.pl: Allow command option -D to override temp variables Steven Rostedt
2025-07-18 20:18 ` [PATCH 3/5] ktest.pl: Have -D option work without a space Steven Rostedt
2025-07-18 20:18 ` [PATCH 4/5] ktest.pl: Prevent recursion of default variable options Steven Rostedt
2025-07-18 20:18 ` [PATCH 5/5] ktest.pl: Always display BUILD_DIR and OUTPUT_DIR at the start of tests Steven Rostedt
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=20250718201840.714067501@kernel.org \
--to=rostedt@kernel.org \
--cc=dhaval.giani@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=warthog9@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.