selftests: kselftest framework: provide "finished" helper
authorKees Cook <keescook@chromium.org>
Wed, 16 Feb 2022 04:32:34 +0000 (15:32 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 17 Feb 2022 03:47:04 +0000 (14:47 +1100)
commit94edc8a3482e640f263b0223ebdccbe2745381f9
treec29dc7e529a33614fea3d5ffe3f443cd3fbfebc5
parent01dd141b8818ab016b9079afa081f54b2cba14ec
selftests: kselftest framework: provide "finished" helper

Instead of having each time that wants to use ksft_exit() have to figure
out the internals of kselftest.h, add the helper ksft_finished() that
makes sure the passes, xfails, and skips are equal to the test plan count.

Link: https://lkml.kernel.org/r/20220201013717.2464392-1-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
tools/testing/selftests/kselftest.h
tools/testing/selftests/vm/memfd_secret.c