<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/ktest/ktest.pl, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-29T13:30:08+00:00</updated>
<entry>
<title>ktest.pl: Add new PATCHCHECK_SKIP option to skip testing individual commits</title>
<updated>2025-07-29T13:30:08+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2025-07-25T15:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5e71638ddd7f1dc0b9f3a5ac8ab8bef48b9f0ee'/>
<id>urn:sha1:a5e71638ddd7f1dc0b9f3a5ac8ab8bef48b9f0ee</id>
<content type='text'>
When testing a series of commits that also includes changes to the Linux
tools directory, it is useless to test the changes in tools as they may
not affect the kernel itself. Doing tests on the kernel for changes that
do not affect the kernel is a waste of time.

Add a PATCHCHECK_SKIP that takes a series of shas that will be skipped
while doing the individual commit tests.

For example, the runtime verification may have a series of commits like:

$ git log --abbrev-commit --pretty=oneline fac5493251a6~1..HEAD
3d3800b4f7f4 rv: Remove rv_reactor's reference counter
3d3c376118b5 rv: Merge struct rv_reactor_def into struct rv_reactor
24cbfe18d55a rv: Merge struct rv_monitor_def into struct rv_monitor
b0c08dd5348d rv: Remove unused field in struct rv_monitor_def
58d5f0d437a8 (debiantesting-x86-64/trace/rv/core) rv: Return init error when registering monitors
560473f2e2d7 verification/rvgen: Organise Kconfig entries for nested monitors
9efcf590827c tools/dot2c: Fix generated files going over 100 column limit
1160ccaf772f tools/rv: Stop gracefully also on SIGTERM
f60227f34489 tools/rv: Do not skip idle in trace
f3735df6281e verification/rvgen: Do not generate unused variables
6fb37c2a27eb verification/rvgen: Generate each variable definition only once
8cfcf9b0e92f verification/rvgen: Support the 'next' operator
fac5493251a6 rv: Allow to configure the number of per-task monitor

Where the first commit touches the kernel followed by a series of commits
that do not, and ends with commits that do. Instead of having to add
multiple patchcheck tests to handle the gaps, just include the commits
that should not be tested:

$ git log --abbrev-commit --pretty=oneline fac5493251a6~1..HEAD |
  grep -e verification -e tools/ | cut -d' ' -f1 |
  while read a ; do echo -n "$a "; done
560473f2e2d7 9efcf590827c 1160ccaf772f f60227f34489 f3735df6281e 6fb37c2a27eb 8cfcf9b0e92f

Then set PATCHCHECK_SKIP to that, and those commits will be skipped.

 PATCHCHECK_SKIP = 560473f2e2d7 9efcf590827c 1160ccaf772f f60227f34489 f3735df6281e 6fb37c2a27eb 8cfcf9b0e92f

Cc: John 'Warthog9' Hawley &lt;warthog9@kernel.org&gt;
Cc: Dhaval Giani &lt;dhaval.giani@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/20250725112153.1dd06b84@gandalf.local.home
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Always display BUILD_DIR and OUTPUT_DIR at the start of tests</title>
<updated>2025-07-21T20:31:04+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2025-07-18T20:18:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23a2d4c64e713b5645e3af8fc9da0931600ba85c'/>
<id>urn:sha1:23a2d4c64e713b5645e3af8fc9da0931600ba85c</id>
<content type='text'>
As ktest.pl can run in various different directories, to make sure the
test is running in the proper directory with the proper source and proper
destination directory, display the content of BUILD_DIR and OUTPUT_DIR at
the start of every test.

This can be helpful for the test runner to stop the test if a test is
running in the wrong location instead of finding out after the test has
completed.

Cc: "John Warthog9 Hawley" &lt;warthog9@kernel.org&gt;
Cc: Dhaval Giani &lt;dhaval.giani@gmail.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/20250718202053.898022631@kernel.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Prevent recursion of default variable options</title>
<updated>2025-07-21T20:31:04+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2025-07-18T20:18:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61f7e318e99d3b398670518dd3f4f8510d1800fc'/>
<id>urn:sha1:61f7e318e99d3b398670518dd3f4f8510d1800fc</id>
<content type='text'>
If a default variable contains itself, do not recurse on it.

For example:

  ADD_CONFIG := ${CONFIG_DIR}/temp_config
  DEFAULTS
  ADD_CONFIG = ${CONFIG_DIR}/default_config ${ADD_CONFIG}

The above works because the temp variable ADD_CONFIG (is a temp because it
is created with ":=") is already defined, it will be substituted in the
variable option. But if it gets commented out:

  # ADD_CONFIG := ${CONFIG_DIR}/temp_config
  DEFAULTS
  ADD_CONFIG = ${CONFIG_DIR}/default_config ${ADD_CONFIG}

Then the above will go into a recursive loop where ${ADD_CONFIG} will
get replaced with the current definition of ADD_CONFIG which contains the
${ADD_CONFIG} and that will also try to get converted. ktest.pl will error
after 100 attempts of recursion and fail.

When replacing a variable with the default variable, if the default
variable contains itself, do not replace it.

Cc: "John Warthog9 Hawley" &lt;warthog9@kernel.org&gt;
Cc: Dhaval Giani &lt;dhaval.giani@gmail.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/20250718202053.732189428@kernel.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Have -D option work without a space</title>
<updated>2025-07-21T20:31:04+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2025-07-18T20:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=acd98e230ee86a9812c56a081929248cdbe412fa'/>
<id>urn:sha1:acd98e230ee86a9812c56a081929248cdbe412fa</id>
<content type='text'>
Allow -DBUILD_TYPE=boot work the same as -D BUILD_TYPE=boot just like
normal single character option does in most applications.

Cc: "John Warthog9 Hawley" &lt;warthog9@kernel.org&gt;
Cc: Dhaval Giani &lt;dhaval.giani@gmail.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/20250718202053.567246162@kernel.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Allow command option -D to override temp variables</title>
<updated>2025-07-21T20:31:04+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2025-07-18T20:18:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3bcdb6e90c9f5403e764dc9cdbe7907026de59a0'/>
<id>urn:sha1:3bcdb6e90c9f5403e764dc9cdbe7907026de59a0</id>
<content type='text'>
Currently -D only updates the persistent options that are defined with
"=". Allow it to also override all temp variables that are defined with
":=".

 ktest.pl -D 'USE_TEMP_DIR:=1' -D 'TEST_TYPE[2]=build' config

Cc: "John Warthog9 Hawley" &lt;warthog9@kernel.org&gt;
Cc: Dhaval Giani &lt;dhaval.giani@gmail.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/20250718202053.399653933@kernel.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Add -D option to override options</title>
<updated>2025-07-21T20:31:04+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2025-07-18T20:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23b772c15f5b39fb2c27b386946232769e4dcc32'/>
<id>urn:sha1:23b772c15f5b39fb2c27b386946232769e4dcc32</id>
<content type='text'>
Add -D option that lets the user override options in the config.

For instance, if the config has: BUILD_NOCLEAN=1 which prevents mrproper
from being called before builds, and the user wants to call it once. The
user can run:

  ktest -D BUILD_NOCLEAN=0 config

And the default "BUILD_NOCLEAN" options will be disabled.

If the user wants to change the second test to do a build and not boot,
the user can run:

  ktest -D 'TEST_TYPE[2]=build' config

Where the '[#]' is for the test to assign the variable for. In the above
example, it will happen on test 2.

Cc: "John Warthog9 Hawley" &lt;warthog9@kernel.org&gt;
Cc: Dhaval Giani &lt;dhaval.giani@gmail.com&gt;
Cc: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/20250718202053.231478909@kernel.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest: Fix Test Failures Due to Missing LOG_FILE Directories</title>
<updated>2025-03-27T13:34:00+00:00</updated>
<author>
<name>Ayush Jain</name>
<email>Ayush.jain3@amd.com</email>
</author>
<published>2025-03-07T04:38:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a1bed232781d356f842576daacc260f0d0c8d2e'/>
<id>urn:sha1:5a1bed232781d356f842576daacc260f0d0c8d2e</id>
<content type='text'>
Handle missing parent directories for LOG_FILE path to prevent test
failures. If the parent directories don't exist, create them to ensure
the tests proceed successfully.

Cc: &lt;warthog9@eaglescrag.net&gt;
Link: https://lore.kernel.org/20250307043854.2518539-1-Ayush.jain3@amd.com
Signed-off-by: Ayush Jain &lt;Ayush.jain3@amd.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Fix typo in comment</title>
<updated>2024-12-18T21:51:50+00:00</updated>
<author>
<name>Ba Jing</name>
<email>bajing@cmss.chinamobile.com</email>
</author>
<published>2024-09-02T12:46:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=770221a36932a65c5a8b7711b5477430a1dbf5e8'/>
<id>urn:sha1:770221a36932a65c5a8b7711b5477430a1dbf5e8</id>
<content type='text'>
"on of these" should be "one of these".

Fixes: 77d942ceacbad ("ktest: Create variables for the ktest config files")
Link: https://lore.kernel.org/20240902124645.5674-1-bajing@cmss.chinamobile.com
Signed-off-by: Ba Jing &lt;bajing@cmss.chinamobile.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Remove unused declarations in run_bisect_test function</title>
<updated>2024-12-18T21:51:50+00:00</updated>
<author>
<name>Ba Jing</name>
<email>bajing@cmss.chinamobile.com</email>
</author>
<published>2024-09-02T13:07:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=776735b954f49f85fd19e1198efa421fae2ad77c'/>
<id>urn:sha1:776735b954f49f85fd19e1198efa421fae2ad77c</id>
<content type='text'>
Since $output and $ret are not used in the subsequent code, the declarations
should be removed.

Fixes: a75fececff3c ("ktest: Added sample.conf, new %default option format")
Link: https://lore.kernel.org/20240902130735.6034-1-bajing@cmss.chinamobile.com
Signed-off-by: Ba Jing &lt;bajing@cmss.chinamobile.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Check kernelrelease return in get_version</title>
<updated>2024-12-18T21:51:38+00:00</updated>
<author>
<name>Ricardo B. Marliere</name>
<email>rbm@suse.com</email>
</author>
<published>2024-12-05T20:50:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a4e17a8f239a545c463f8ec27db4ed6e74b31841'/>
<id>urn:sha1:a4e17a8f239a545c463f8ec27db4ed6e74b31841</id>
<content type='text'>
In the case of a test that uses the special option ${KERNEL_VERSION} in one
of its settings but has no configuration available in ${OUTPUT_DIR}, for
example if it's a new empty directory, then the `make kernelrelease` call
will fail and the subroutine will chomp an empty string, silently. Fix that
by adding an empty configuration and retrying.

Cc: stable@vger.kernel.org
Cc: John Hawley &lt;warthog9@eaglescrag.net&gt;
Fixes: 5f9b6ced04a4e ("ktest: Bisecting, install modules, add logging")
Link: https://lore.kernel.org/20241205-ktest_kver_fallback-v2-1-869dae4c7777@suse.com
Signed-off-by: Ricardo B. Marliere &lt;rbm@suse.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
