<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/run_kselftest.sh, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-01-16T20:46:40Z</updated>
<entry>
<title>selftests/run_kselftest.sh: Add `--skip` argument option</title>
<updated>2026-01-16T20:46:40Z</updated>
<author>
<name>Ricardo B. Marlière</name>
</author>
<published>2026-01-16T14:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ec6cefc398b93e5f28500f80e7321a80fffee8a'/>
<id>urn:sha1:3ec6cefc398b93e5f28500f80e7321a80fffee8a</id>
<content type='text'>
Currently the only way of excluding certain tests from a collection is by
passing all the other tests explicitly via `--test`. Therefore, if the user
wants to skip a single test the resulting command line might be too big,
depending on the collection. Add an option `--skip` that takes care of
that.

Link: https://lore.kernel.org/r/20260116-selftests-add_skip_opt-v1-1-ab54afaae81b@suse.com
Signed-off-by: Ricardo B. Marlière &lt;rbm@suse.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/run_kselftest.sh: exit with error if tests fail</title>
<updated>2025-11-19T22:00:22Z</updated>
<author>
<name>Brendan Jackman</name>
</author>
<published>2025-11-11T17:36:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9e6269e330392fd75f8d9db268e7e10541a7ba4'/>
<id>urn:sha1:d9e6269e330392fd75f8d9db268e7e10541a7ba4</id>
<content type='text'>
Parsing KTAP is quite an inconvenience, but most of the time the thing
you really want to know is "did anything fail"?

Let's give the user the his information without them needing
to parse anything.

Because of the use of subshells and namespaces, this needs to be
communicated via a file. Just write arbitrary data into the file and
treat non-empty content as a signal that something failed.

In case any user depends on the current behaviour, such as running this
from a script with `set -e` and parsing the result for failures
afterwards, add a flag they can set to get the old behaviour, namely
--no-error-on-fail.

Link: https://lore.kernel.org/r/20251111-b4-ksft-error-on-fail-v3-1-0951a51135f6@google.com
Signed-off-by: Brendan Jackman &lt;jackmanb@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/run_kselftest.sh: Use readlink if realpath is not available</title>
<updated>2025-05-15T22:52:47Z</updated>
<author>
<name>Yosry Ahmed</name>
</author>
<published>2025-03-18T16:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1107dc4c5b06188a3fb4897ceb197eb320a52e85'/>
<id>urn:sha1:1107dc4c5b06188a3fb4897ceb197eb320a52e85</id>
<content type='text'>
'realpath' is not always available,  fallback to 'readlink -f' if is not
available. They seem to work equally well in this context.

Link: https://lore.kernel.org/r/20250318160510.3441646-1-yosry.ahmed@linux.dev
Signed-off-by: Yosry Ahmed &lt;yosry.ahmed@linux.dev&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/run_kselftest.sh: Fix help string for --per-test-log</title>
<updated>2025-01-15T00:06:32Z</updated>
<author>
<name>Brendan Jackman</name>
</author>
<published>2024-12-20T16:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=103c0b5e82fb0f7c66c410897588095e9a1f64f6'/>
<id>urn:sha1:103c0b5e82fb0f7c66c410897588095e9a1f64f6</id>
<content type='text'>
This is documented as --per_test_log but the argument is actually
--per-test-log.

Link: https://lore.kernel.org/r/20241220-per-test-log-v1-1-de5afe69fdf4@google.com
Signed-off-by: Brendan Jackman &lt;jackmanb@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kselftest/runner.sh: add netns support</title>
<updated>2023-12-23T00:26:32Z</updated>
<author>
<name>Hangbin Liu</name>
</author>
<published>2023-12-19T09:48:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d0b4ad82d6117e6d7ead50f64be54ec782aa1fe'/>
<id>urn:sha1:9d0b4ad82d6117e6d7ead50f64be54ec782aa1fe</id>
<content type='text'>
Add a variable RUN_IN_NETNS if the user wants to run all the selected tests
in namespace in parallel. With this, we can save a lot of testing time.

Note that some tests may not fit to run in namespace, e.g.
net/drop_monitor_tests.sh, as the dwdump needs to be run in init ns.

I also added another parameter -p to make all the logs reported separately
instead of mixing them in the stdout or output.log.

Nit: the NUM in run_one is not used, rename it to test_num.

Acked-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>kselftests: Sort the collections list to avoid duplicate tests</title>
<updated>2023-06-12T22:39:11Z</updated>
<author>
<name>Rishabh Bhatnagar</name>
</author>
<published>2023-06-01T21:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=301d6815cdb3c5de9159d4564cb27e56c6cebd0b'/>
<id>urn:sha1:301d6815cdb3c5de9159d4564cb27e56c6cebd0b</id>
<content type='text'>
If the collections list is not sorted uniq doesn't weed out duplicate
tests correctly. Make sure to sort it before running uniq.

Signed-off-by: Rishabh Bhatnagar &lt;risbhat@amazon.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: allow runners to override the timeout</title>
<updated>2023-06-12T22:39:11Z</updated>
<author>
<name>Luis Chamberlain</name>
</author>
<published>2023-04-14T19:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6a01213e3f812b645cd1079167bf47fc45bb0c8'/>
<id>urn:sha1:f6a01213e3f812b645cd1079167bf47fc45bb0c8</id>
<content type='text'>
The default timeout for selftests tests is 45 seconds. Although
we already have 13 settings for tests of about 96 sefltests which
use a timeout greater than this, we want to try to avoid encouraging
more tests to forcing a higher test timeout as selftests strives to
run all tests quickly. Selftests also uses the timeout as a non-fatal
error. Only tests runners which have control over a system would know
if to treat a timeout as fatal or not.

To help with all this:

  o Enhance documentation to avoid future increases of insane timeouts
  o Add the option to allow overriding the default timeout with test
    runners with a command line option

Suggested-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Tested-by:Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/run_kselftest.sh: fix dry-run typo</title>
<updated>2020-11-10T21:51:39Z</updated>
<author>
<name>Hangbin Liu</name>
</author>
<published>2020-10-28T08:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=93f20eff0cca972d74cb554a2e8b47730228be16'/>
<id>urn:sha1:93f20eff0cca972d74cb554a2e8b47730228be16</id>
<content type='text'>
Should be -d instead of -n for dry-run.

Fixes: 5da1918446a1 ("selftests/run_kselftest.sh: Make each test individually selectable")
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/run_kselftest.sh: Make each test individually selectable</title>
<updated>2020-10-07T13:59:15Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2020-09-28T20:26:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5da1918446a1d50d57f2f6062f7fdede0b052473'/>
<id>urn:sha1:5da1918446a1d50d57f2f6062f7fdede0b052473</id>
<content type='text'>
Currently with run_kselftest.sh there is no way to choose which test
we could run. All the tests listed in kselftest-list.txt are all run
every time. This patch enhanced the run_kselftest.sh to make the test
collections (or tests) individually selectable. e.g.:

$ ./run_kselftest.sh -c seccomp -t timers:posix_timers -t timers:nanosleep

Additionally adds a way to list all known tests with "-l", usage
with "-h", and perform a dry run without running tests with "-n".

Co-developed-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: Extract run_kselftest.sh and generate stand-alone test list</title>
<updated>2020-10-07T13:58:54Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2020-09-28T20:26:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0f0a5df4e081e7a659929303fe83450edce9a3e'/>
<id>urn:sha1:f0f0a5df4e081e7a659929303fe83450edce9a3e</id>
<content type='text'>
Instead of building a script on the fly (which just repeats the same
thing for each test collection), move the script out of the Makefile and
into run_kselftest.sh, which reads kselftest-list.txt.

Adjust the emit_tests target to report each test on a separate line so
that test running tools (e.g. LAVA) can easily remove individual
tests (for example, as seen in [1]).

[1] https://github.com/Linaro/test-definitions/pull/208/commits/2e7b62155e4998e54ac0587704932484d4ff84c8

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
</feed>
