selftests: ktap_helpers: Add a helper to finish the test
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Wed, 31 Jan 2024 22:02:43 +0000 (17:02 -0500)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 20 Feb 2024 22:53:20 +0000 (15:53 -0700)
commit2dd0b5a8fcc4f6fef307c79a3ff1d91d9595004d
treea57bd1d5ccd4d84d8738d66bcdf22c09240aef79
parentd63fde98b8929da625cc36c2f1143e837c0e6d10
selftests: ktap_helpers: Add a helper to finish the test

Similar to the C counterpart, keep track of the number of test cases in
the test plan and add a helper function to be called at the end of the
test to print the results and exit with the corresponding exit code.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest/ktap_helpers.sh