aboutsummaryrefslogtreecommitdiffstats
path: root/include/kunit/assert.h
diff options
context:
space:
mode:
authorEric Chan <ericchancf@google.com>2024-07-11 19:39:31 +0000
committerShuah Khan <skhan@linuxfoundation.org>2024-07-12 10:12:05 -0600
commit7d4087b013895524438f2522367c984f776e09e3 (patch)
treedcb80789de2e9f53e40953b5c4ea8120d610d4f7 /include/kunit/assert.h
parentkunit: Fix the comment of KUNIT_ASSERT_STRNEQ as assertion (diff)
downloadlinux-7d4087b013895524438f2522367c984f776e09e3.tar.gz
linux-7d4087b013895524438f2522367c984f776e09e3.zip
kunit: Rename KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT for readability
Both KUNIT_FAIL and KUNIT_ASSERT_FAILURE defined to KUNIT_FAIL_ASSERTION with different tpye of kunit_assert_type. The current naming of KUNIT_ASSERT_FAILURE and KUNIT_FAIL_ASSERTION is confusing due to their similarities. To improve readability and symmetry, renames KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT. Makes the naming consistent, with KUNIT_FAIL and KUNIT_FAIL_AND_ABORT being symmetrical. Additionally, an explanation for KUNIT_FAIL_AND_ABORT has been added to clarify its usage. Signed-off-by: Eric Chan <ericchancf@google.com> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'include/kunit/assert.h')
-rw-r--r--include/kunit/assert.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kunit/assert.h b/include/kunit/assert.h
index 7e7490a74b13..bb879389f11d 100644
--- a/include/kunit/assert.h
+++ b/include/kunit/assert.h
@@ -60,7 +60,7 @@ void kunit_assert_prologue(const struct kunit_loc *loc,
* struct kunit_fail_assert - Represents a plain fail expectation/assertion.
* @assert: The parent of this type.
*
- * Represents a simple KUNIT_FAIL/KUNIT_ASSERT_FAILURE that always fails.
+ * Represents a simple KUNIT_FAIL/KUNIT_FAIL_AND_ABORT that always fails.
*/
struct kunit_fail_assert {
struct kunit_assert assert;