selftests/seccomp: Pin benchmark to single CPU
authorKees Cook <keescook@chromium.org>
Tue, 6 Feb 2024 09:53:19 +0000 (01:53 -0800)
committerKees Cook <keescook@chromium.org>
Wed, 7 Feb 2024 11:10:57 +0000 (03:10 -0800)
commit55e68669b131401074513f903c097dae06ec6db1
tree2ac5fa9a92d3364071919c0c1ef44c91eb6e4ee5
parent8e3c9f9f3a0742cd12b682a1766674253b33fcf0
selftests/seccomp: Pin benchmark to single CPU

The seccomp benchmark test (for validating the benefit of bitmaps) can
be sensitive to scheduling speed, so pin the process to a single CPU,
which appears to significantly improve reliability, and loosen the
"close enough" checking to allow up to 10% variance instead of 1%.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202402061002.3a8722fd-oliver.sang@intel.com
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Drewry <wad@chromium.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
tools/testing/selftests/seccomp/seccomp_benchmark.c