selftests: kselftest framework: provide "finished" helper
authorKees Cook <keescook@chromium.org>
Mon, 28 Feb 2022 23:06:36 +0000 (10:06 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 1 Mar 2022 09:31:48 +0000 (20:31 +1100)
commit9979e4b51991f34519e7de1ba3445c71cd2747d9
tree3ad40849a17c3014aeaaef9aaa378643dc73bc5e
parent75ffee2a3e59f9c3c19c0e1431700b0cd791c792
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