]> git.dujemihanovic.xyz Git - linux.git/commit
kselftest/seccomp: Report each expectation we assert as a KTAP test
authorMark Brown <broonie@kernel.org>
Wed, 24 Jan 2024 13:00:19 +0000 (13:00 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 30 Jan 2024 15:55:42 +0000 (08:55 -0700)
commitb54761f6e9773350c0d1fb8e1e5aacaba7769d0f
tree92b584b3ffbba93a8c0ef5812be78558e0aabdb6
parent5820cfee443f8a90ea3eb9f99f57f2049a4a93c3
kselftest/seccomp: Report each expectation we assert as a KTAP test

The seccomp benchmark test makes a number of checks on the performance it
measures and logs them to the output but does so in a custom format which
none of the automated test runners understand meaning that the chances that
anyone is paying attention are slim. Let's additionally log each result in
KTAP format so that automated systems parsing the test output will see each
comparison as a test case. The original logs are left in place since they
provide the actual numbers for analysis.

As part of this rework the flow for the main program so that when we skip
tests we still log all the tests we skip, this is because the standard KTAP
headers and footers include counts of the number of expected and run tests.

Tested-by: Anders Roxell <anders.roxell@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/seccomp/seccomp_benchmark.c