<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/kselftest.h, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-02-13T15:34:47Z</updated>
<entry>
<title>selftest: include stdio.h in kselftest.h</title>
<updated>2019-02-13T15:34:47Z</updated>
<author>
<name>Tycho Andersen</name>
<email>tycho@tycho.ws</email>
</author>
<published>2019-01-19T00:12:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a18261d71bbc625bc32abbcded71acc408cca393'/>
<id>urn:sha1:a18261d71bbc625bc32abbcded71acc408cca393</id>
<content type='text'>
While playing around with a way to skip the seccomp get_metadata test, I
noticed that this header uses printf() without defining it, leading to,

../kselftest.h: In function ‘ksft_print_header’:
../kselftest.h:61:3: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
   printf("TAP version 13\n");
   ^~~~~~
../kselftest.h:61:3: warning: incompatible implicit declaration of built-in function ‘printf’
../kselftest.h:61:3: note: include ‘&lt;stdio.h&gt;’ or provide a declaration of ‘printf’

if user code doesn't also use printf.

Signed-off-by: Tycho Andersen &lt;tycho@tycho.ws&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: kselftest: Remove outdated comment</title>
<updated>2018-08-27T20:07:46Z</updated>
<author>
<name>Thiago Jung Bauermann</name>
<email>bauerman@linux.ibm.com</email>
</author>
<published>2018-07-25T02:57:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c31d02d1290e1e82a08015199e408228e152991f'/>
<id>urn:sha1:c31d02d1290e1e82a08015199e408228e152991f</id>
<content type='text'>
Commit 3c07aaef6598 ("selftests: kselftest: change KSFT_SKIP=4 instead of
KSFT_PASS") reverted commit 11867a77eb85 ("selftests: kselftest framework:
change skip exit code to 0") but missed removing the comment which that
commit added, so do that now.

Signed-off-by: Thiago Jung Bauermann &lt;bauerman@linux.ibm.com&gt;
Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: kselftest: change KSFT_SKIP=4 instead of KSFT_PASS</title>
<updated>2018-05-30T21:21:52Z</updated>
<author>
<name>Shuah Khan (Samsung OSG)</name>
<email>shuah@kernel.org</email>
</author>
<published>2018-05-01T22:03:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3c07aaef65988473c6cea5bd194125f905953fcc'/>
<id>urn:sha1:3c07aaef65988473c6cea5bd194125f905953fcc</id>
<content type='text'>
KSFT_SKIP points to KSFT_PASS resulting in reporting skipped tests as
Passed, when test programs exit with KSFT_SKIP or call ksft_exit_skip().
If tests are skipped because of unmet dependencies and/or unsupported
configuration, reporting them as passed leads to too many false positives.

Fix it to return a skip code of 4 to clearly differentiate the skipped
tests.

Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: kselftest framework: add handling for TAP header level</title>
<updated>2018-03-06T02:10:27Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2018-02-22T00:11:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=10f531f6748228583b8c4244216e9e3f34d47379'/>
<id>urn:sha1:10f531f6748228583b8c4244216e9e3f34d47379</id>
<content type='text'>
Introduce environment variable KSFT_TAP_LEVEL to avoid printing
nested TAP headers for each test. lib.mk run_tests target prints
TAP header before invoking the test program or test script. Tests
need a way to suppress TAP headers if it is already printed out.

This new environment variable adds a way for ksft_print_header()
print TAP header only when KSFT_TAP_LEVEL isn't set.

lib.mk run_tests and test program should print TAP header and set
KSFT_TAP_LEVEL to avoid a second TAP header to be printed.

selftests Makefile should export KSFT_TAP_LEVEL and add TAP Header
echo to the run_kselftest.sh script from emit_tests target handling.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: kselftest.h: Add SPDX license identifier</title>
<updated>2018-01-12T18:46:21Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2018-01-10T02:22:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7c466b97ccc6935c0a668cfefcda874c7560c3dc'/>
<id>urn:sha1:7c466b97ccc6935c0a668cfefcda874c7560c3dc</id>
<content type='text'>
Replace GPL license statement with SPDX GPL-2.0 license identifier.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: kselftest framework: change skip exit code to 0</title>
<updated>2017-08-25T16:02:00Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-08-19T02:51:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=11867a77eb854248a1e7a1b4e8ba58aadadd7701'/>
<id>urn:sha1:11867a77eb854248a1e7a1b4e8ba58aadadd7701</id>
<content type='text'>
When a test is skipped, instead of using a special exit code of 4, treat
it as pass condition and use exit code of 0. It makes sense to treat skip
as pass since the test couldn't be run as opposed to a failed test.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: kselftest framework: add error counter</title>
<updated>2017-08-09T16:39:05Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-08-04T21:07:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c0bb2cf40e42b2fe5c8aa1c4f6f4d09c98839d91'/>
<id>urn:sha1:c0bb2cf40e42b2fe5c8aa1c4f6f4d09c98839d91</id>
<content type='text'>
Some tests track errors in addition to test failures. Add ksft_error
counter, ksft_get_error_cnt(), and ksft_test_result_error() API to
get the counter value and print error message.

Update ksft_print_cnts(), and ksft_test_num() to include error counter.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: kselftest framework: add API to return pass/fail/* counts</title>
<updated>2017-07-28T19:20:19Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-07-24T19:55:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1d3ee8bef9549ec8c16223de452f2e08b81f83d9'/>
<id>urn:sha1:1d3ee8bef9549ec8c16223de452f2e08b81f83d9</id>
<content type='text'>
Some tests print final pass/fail message based on fail count. Add
ksft_get_*_cnt() API to kselftest framework to return counts.

Update ksft_print_cnts() to print the test results summary message with
individual pass, fail, ... counters.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Reviewed-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
</content>
</entry>
<entry>
<title>kselftest: add ksft_print_msg() function to output general information</title>
<updated>2017-06-30T22:15:04Z</updated>
<author>
<name>Paul Elder</name>
<email>paul.elder@pitt.edu</email>
</author>
<published>2017-06-28T14:40:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ab52a484455007b3c9c11e18f6d0eed6d8f2de4e'/>
<id>urn:sha1:ab52a484455007b3c9c11e18f6d0eed6d8f2de4e</id>
<content type='text'>
Add a generic information output function: ksft_print_msg()

Signed-off-by: Paul Elder &lt;paul.elder@pitt.edu&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>kselftest: make ksft_* output functions variadic</title>
<updated>2017-06-30T22:14:55Z</updated>
<author>
<name>Paul Elder</name>
<email>paul.elder@pitt.edu</email>
</author>
<published>2017-06-28T14:40:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=151b2732111f0743e764a7bc62d4f580341a62f3'/>
<id>urn:sha1:151b2732111f0743e764a7bc62d4f580341a62f3</id>
<content type='text'>
Make the ksft_* output functions variadic to allow string formatting
directly in these functions.

Signed-off-by: Paul Elder &lt;paul.elder@pitt.edu&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
</feed>
