selftests/harness: Limit step counter reporting
authorKees Cook <keescook@chromium.org>
Tue, 14 Jul 2020 18:30:23 +0000 (11:30 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 17 Jul 2020 19:56:35 +0000 (13:56 -0600)
commit850d0cc64c8e2e0895acf735ac0a53c78b80dbe5
treea16d20db30270299c9bab9838eb60b2845a6eadd
parent4c6614dc86ad99208e7582108669831c4ab72982
selftests/harness: Limit step counter reporting

When the selftest "step" counter grew beyond 255, non-fatal warnings
were being emitted, which is noisy and pointless. There are selftests
with more than 255 steps (especially those in loops, etc). Instead,
just cap "steps" to 254 and do not report the saturation.

Reported-by: Ralph Campbell <rcampbell@nvidia.com>
Tested-by: Ralph Campbell <rcampbell@nvidia.com>
Fixes: 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest_harness.h