diff options
author | NĂcolas F. R. A. Prado <nfraprado@collabora.com> | 2024-02-01 01:02:42 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-02-21 01:53:15 +0300 |
commit | d63fde98b8929da625cc36c2f1143e837c0e6d10 (patch) | |
tree | 349a08298ee011e2714fefe2086f145a56118783 /tools/testing/selftests/kselftest | |
parent | d90b7c705c5d9b5cb6b71b8aaa773c031084056c (diff) | |
download | linux-d63fde98b8929da625cc36c2f1143e837c0e6d10.tar.xz |
selftests: ktap_helpers: Add a helper to abort the test
Similar to the C counterpart, add a helper function to abort the
remainder of the test.
Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/kselftest')
-rw-r--r-- | tools/testing/selftests/kselftest/ktap_helpers.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/kselftest/ktap_helpers.sh b/tools/testing/selftests/kselftest/ktap_helpers.sh index 29107924f5c2..87f93c6900c5 100644 --- a/tools/testing/selftests/kselftest/ktap_helpers.sh +++ b/tools/testing/selftests/kselftest/ktap_helpers.sh @@ -87,6 +87,13 @@ ktap_test_result() { fi } +ktap_exit_fail_msg() { + echo "Bail out! " $@ + ktap_print_totals + + exit "$KSFT_FAIL" +} + ktap_print_totals() { echo "# Totals: pass:$KTAP_CNT_PASS fail:$KTAP_CNT_FAIL xfail:0 xpass:0 skip:$KTAP_CNT_SKIP error:0" } |