mbox series

[0/2] kselftest/seccomp: Convert to KTAP output

Message ID 20231219-b4-kselftest-seccomp-benchmark-ktap-v1-0-f99e228631b0@kernel.org (mailing list archive)
Headers show
Series kselftest/seccomp: Convert to KTAP output | expand

Message

Mark Brown Dec. 19, 2023, 9:21 p.m. UTC
Currently the seccomp benchmark selftest produces non-standard output,
meaning that while it makes a number of checks of the performance it
observes this has to be parsed by humans.  This means that automated
systems running this suite of tests are almost certainly ignoring the
results which isn't ideal for spotting problems.  Let's rework things so
that each check that the program does is reported as a test result to
the framework.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (2):
      kselftest/seccomp: Use kselftest output functions for benchmark
      kselftest/seccomp: Report each expectation we assert as a KTAP test

 .../testing/selftests/seccomp/seccomp_benchmark.c  | 105 +++++++++++++--------
 1 file changed, 65 insertions(+), 40 deletions(-)
---
base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
change-id: 20231219-b4-kselftest-seccomp-benchmark-ktap-357603823708

Best regards,

Comments

Anders Roxell Dec. 20, 2023, 5:12 p.m. UTC | #1
On 2023-12-19 21:21, Mark Brown wrote:
> Currently the seccomp benchmark selftest produces non-standard output,
> meaning that while it makes a number of checks of the performance it
> observes this has to be parsed by humans.  This means that automated
> systems running this suite of tests are almost certainly ignoring the
> results which isn't ideal for spotting problems.  Let's rework things so
> that each check that the program does is reported as a test result to
> the framework.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>

Tested-by: Anders Roxell <anders.roxell@linaro.org>

Tested these patches on today tag and it works as expected.

seccomp_seccomp_benchmark_native_1_bitmap pass
seccomp_seccomp_benchmark_native_1_filter pass
seccomp_seccomp_benchmark_per-filter_last_2_diff_per-filter_filters_4 fail
seccomp_seccomp_benchmark_1_bitmapped_2_bitmapped pass
seccomp_seccomp_benchmark_entry_1_bitmapped pass
seccomp_seccomp_benchmark_entry_2_bitmapped fail
seccomp_seccomp_benchmark_native_entry_per_filter_4_4_filters_total fail

Now with this change it shows up in the results.

Cheers,
Anders