From: NĂ­colas F. R. A. Prado Date: Wed, 31 Jan 2024 22:02:42 +0000 (-0500) Subject: selftests: ktap_helpers: Add a helper to abort the test X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d63fde98b8929da625cc36c2f1143e837c0e6d10;p=linux.git 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 Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/kselftest/ktap_helpers.sh b/tools/testing/selftests/kselftest/ktap_helpers.sh index 29107924f5c20..87f93c6900c59 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" }