mirror of
https://github.com/torvalds/linux.git
synced 2026-05-02 05:22:49 -04:00
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>
This commit is contained in:
@@ -31,7 +31,7 @@ static int input_test_init(struct kunit *test)
|
||||
ret = input_register_device(input_dev);
|
||||
if (ret) {
|
||||
input_free_device(input_dev);
|
||||
KUNIT_ASSERT_FAILURE(test, "Register device failed: %d", ret);
|
||||
KUNIT_FAIL_AND_ABORT(test, "Register device failed: %d", ret);
|
||||
}
|
||||
|
||||
test->priv = input_dev;
|
||||
|
||||
Reference in New Issue
Block a user