<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/Makefile, branch v5.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-10-01T19:28:38Z</updated>
<entry>
<title>kselftest: exclude failed TARGETS from runlist</title>
<updated>2019-10-01T19:28:38Z</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2019-09-26T17:52:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=131b30c94fbc0adb15f911609884dd39dada8f00'/>
<id>urn:sha1:131b30c94fbc0adb15f911609884dd39dada8f00</id>
<content type='text'>
A TARGET which failed to be built/installed should not be included in the
runlist generated inside the run_kselftest.sh script.

Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kselftest: add capability to skip chosen TARGETS</title>
<updated>2019-10-01T19:19:04Z</updated>
<author>
<name>Cristian Marussi</name>
<email>cristian.marussi@arm.com</email>
</author>
<published>2019-09-26T17:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a24f7f6b610910ee328df11392e21925cefdecb'/>
<id>urn:sha1:3a24f7f6b610910ee328df11392e21925cefdecb</id>
<content type='text'>
Let the user specify an optional TARGETS skiplist through the new optional
SKIP_TARGETS Makefile variable.

It is easier to skip at will using a reduced and well defined list of
possibly problematic targets with SKIP_TARGETS than to provide a partially
stripped down list of good targets using the usual TARGETS variable.

Signed-off-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: Add kselftest-all and kselftest-install targets</title>
<updated>2019-10-01T16:11:08Z</updated>
<author>
<name>Shuah Khan</name>
<email>skhan@linuxfoundation.org</email>
</author>
<published>2019-09-26T22:40:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17eac6c2db8b2cdfe33d40229bdda2acd86b304a'/>
<id>urn:sha1:17eac6c2db8b2cdfe33d40229bdda2acd86b304a</id>
<content type='text'>
Add kselftest-all target to build tests from the top level
Makefile. This is to simplify kselftest use-cases for CI and
distributions where build and test systems are different.

Current kselftest target builds and runs tests on a development
system which is a developer use-case.

Add kselftest-install target to install tests from the top level
Makefile. This is to simplify kselftest use-cases for CI and
distributions where build and test systems are different.

This change addresses requests from developers and testers to add
support for installing kselftest from the main Makefile.

In addition, make the install directory the same when install is
run using "make kselftest-install" or by running kselftest_install.sh.
Also fix the INSTALL_PATH variable conflict between main Makefile and
selftests Makefile.

Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Acked-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: use "$(MAKE)" instead of "make"</title>
<updated>2019-08-19T20:21:36Z</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2019-08-16T16:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ac33e4e9b5e4ccdd43c9d4e77882a1af0e41dec'/>
<id>urn:sha1:0ac33e4e9b5e4ccdd43c9d4e77882a1af0e41dec</id>
<content type='text'>
When doing "make kselftest TARGETS=bpf -j12", bpf progs end up being
compiled sequentially and thus slowly.

The reason is that parent make (tools/testing/selftests/Makefile) does
not share its jobserver with child make
(tools/testing/selftests/bpf/Makefile), therefore the latter runs with
-j1.

Change all instances of "make" to "$(MAKE)", so that the whole make
hierarchy runs using a single jobserver.

Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree</title>
<updated>2019-07-10T15:05:09Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2019-07-06T03:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=051f278e9d81bed253bf89c66c80b8b921aafa8a'/>
<id>urn:sha1:051f278e9d81bed253bf89c66c80b8b921aafa8a</id>
<content type='text'>
Commit 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory")
deprecated KBUILD_SRCTREE.

It is only used in tools/testing/selftest/ to distinguish out-of-tree
build. Replace it with a new boolean flag, building_out_of_srctree.

I also replaced the conditional ($(srctree),.) because the next commit
will allow an absolute path to be used for $(srctree) even when building
in the source tree.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>selftests: avoid KBUILD_OUTPUT dir cluttering with selftest objects</title>
<updated>2019-05-14T23:37:41Z</updated>
<author>
<name>Shuah Khan</name>
<email>skhan@linuxfoundation.org</email>
</author>
<published>2019-05-14T20:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61c2018c0743fe0c9ca68e308b5727b8a7c3d544'/>
<id>urn:sha1:61c2018c0743fe0c9ca68e308b5727b8a7c3d544</id>
<content type='text'>
Running "make kselftest" or building selftests when KBUILD_OUTPUT
is set, will create selftest objects in the KBUILD_OUTPUT directory.
This could be undesirable especially when user didn't intend to
relocate selftest objects.

Use KBUILD_OUTPUT/kselftest to create selftest objects instead of
cluttering the main directory.

Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: fix install target to use default install path</title>
<updated>2019-05-09T15:48:47Z</updated>
<author>
<name>Shuah Khan</name>
<email>skhan@linuxfoundation.org</email>
</author>
<published>2019-05-07T23:44:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3c599281f2b9915200fe0390afe1ae7aca69feb'/>
<id>urn:sha1:c3c599281f2b9915200fe0390afe1ae7aca69feb</id>
<content type='text'>
Install target fails when INSTALL_PATH is undefined. Fix install target
to use "output_dir/install as the default install location. "output_dir"
is either the root of selftests directory under kernel source tree or
output directory specified by O= or KBUILD_OUTPUT.

e.g:
make -C tools/testing/selftests install
&lt;installs under tools/testing/selftests/install&gt;

make O=/tmp/kselftest -C tools/testing/selftests install
&lt;installs under /tmp/kselftest/install&gt;

export KBUILD_OUTPUT=/tmp/kselftest
make -C tools/testing/selftests install
&lt;installs under /tmp/kselftest/install&gt;

In addition, add "all" target as dependency to "install" to build and
install using a single command.

Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: Remove KSFT_TAP_LEVEL</title>
<updated>2019-04-25T19:15:26Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2019-04-24T23:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f41c322f17ec4aa809222dc352439d80862c175b'/>
<id>urn:sha1:f41c322f17ec4aa809222dc352439d80862c175b</id>
<content type='text'>
Since sub-testing can now be detected by indentation level, this removes
KSFT_TAP_LEVEL so that subtests report their TAP header for later parsing.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: Move test output to diagnostic lines</title>
<updated>2019-04-25T19:15:19Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2019-04-24T23:12:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c069b6dedef1fab5420ca8658ed7f9ee4d26007'/>
<id>urn:sha1:5c069b6dedef1fab5420ca8658ed7f9ee4d26007</id>
<content type='text'>
This changes the selftest output so that each test's output is prefixed
with "# " as a TAP "diagnostic line".

This creates a bit of a kernel-specific TAP dialect where the diagnostics
precede the results. The TAP spec isn't entirely clear about this, though,
so I think it's the correct solution so as to keep interactive runs making
sense. If the output _followed_ the result line in the spec-suggested
YAML form, each test would dump all of its output at once instead of as
it went, making debugging harder.

This does, however, solve the recursive TAP output problem, as sub-tests
will simply be prefixed by "# ". Parsing sub-tests becomes a simple
problem of just removing the first two characters of a given top-level
test's diagnostic output, and parsing the results.

Note that the shell construct needed to both get an exit code from
the first command in a pipe and still filter the pipe (to add the "# "
prefix) uses a POSIX solution rather than the bash "pipefail" option
which is not supported by dash.

Since some test environments may have a very minimal set of utilities
available, the new prefixing code will fall back to doing line-at-a-time
prefixing if perl and/or stdbuf are not available.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: Extract logic for multiple test runs</title>
<updated>2019-04-25T19:14:38Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2019-04-24T23:12:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf66078235ca27062f5924ed6901f40becc4a1a4'/>
<id>urn:sha1:bf66078235ca27062f5924ed6901f40becc4a1a4</id>
<content type='text'>
This moves the logic for running multiple tests into a single "run_many"
function of runner.sh. Both "run_tests" and "emit_tests" are modified to
use it. Summary handling is now controlled by the "per_test_logging"
shell flag.

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