From: ben.hutchings@codethink.co.uk (Ben Hutchings)
To: cip-dev@lists.cip-project.org
Subject: [cip-dev] Kselftest use-cases - Shuah Khan
Date: Tue, 07 Nov 2017 17:43:50 +0000 [thread overview]
Message-ID: <1510076630.2465.35.camel@codethink.co.uk> (raw)
In-Reply-To: <1510076438.2465.31.camel@codethink.co.uk>
## Kselftest use-cases - Shuah Khan
[Description](https://osseu17.sched.com/event/CnFp/)
kselftest is the kernel developer regression test suite.??It is
written by kernel developers and users.??It is used by developers,
users, automated test infrastructure (kernel-ci.org, 0-day test
robot).
How to run tests:
* `make --silent kselftest` - run all default targets
? (`TARGETS` in `tools/testing/selftests/Makefile`).
* `make --silent TARGETS=timers kselftest` - run all
? non-destructive tests in `tools/testing/selftests/timers`
* `make --silent -C tools/testing/selftests/timers run_tests`
? - same
Set `O=dir` for an out-of-tree build.??(But cureently this
may require a `.config` file in the source directory.)
Set `quicktest=1` to exclude time-consuming tests.
kselftest outputs a summary of results (since 4.14) following
TAP (Test Anything Protocol).
The output of individual tests can be found in `/tmp` (currently),
but it should be changed to allow specifying directory.
It is possible to run latest selftests on older kernels, but there
will be some failures due to missing features.??Ideally missing
dependencies result in a "skip" result but some maintainers aren't
happy to support that.??One reason is that if a feature is broken so
badly it isn't detected, tests may be skipped rather than failed.
Some tests apparently check for dependencies in a kernel config file.
(It wasn't clear to me where they look for it.)
Tips and hints:
* Use the `--silent` option to suppress make output
* Some tests need to run as root
* Beware that some tests are disruptive
More information:
* [Documentation/dev-tools/kselftest.rst](https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html)
* [Blog entries](https://blogs.s-osg.org/author/shuahkh/)
--
Ben Hutchings
Software Developer, Codethink Ltd.
next prev parent reply other threads:[~2017-11-07 17:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 17:40 [cip-dev] Interesting talks at OSSE/Kernel Summit Ben Hutchings
2017-11-07 17:41 ` [cip-dev] Automating Open Source License Compliance - Kate Stewart Ben Hutchings
2017-11-07 17:42 ` [cip-dev] Detecting Performance Regressions in the Linux Kernel - Jan Kara Ben Hutchings
2017-11-07 17:43 ` [cip-dev] Improve Regression Tracking - Thorsten Leemhuis Ben Hutchings
2017-11-07 17:43 ` Ben Hutchings [this message]
2017-11-10 2:35 ` [cip-dev] Kselftest use-cases - Shuah Khan Daniel Sangorrin
2017-11-08 7:32 ` [cip-dev] Interesting talks at OSSE/Kernel Summit Jan Kiszka
2017-11-08 16:16 ` Chris Paterson
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=1510076630.2465.35.camel@codethink.co.uk \
--to=ben.hutchings@codethink.co.uk \
--cc=cip-dev@lists.cip-project.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox