Skip to content
Commit caae9458 authored by Ricardo Ribalda's avatar Ricardo Ribalda Committed by Shuah Khan
Browse files

kunit: Introduce _NULL and _NOT_NULL macros



Today, when we want to check if a pointer is NULL and not ERR we have
two options:

KUNIT_EXPECT_TRUE(test, ptr == NULL);

or

KUNIT_EXPECT_PTR_NE(test, ptr, (struct mystruct *)NULL);

Create a new set of macros that take care of NULL checks.

Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Reviewed-by: default avatarDaniel Latypov <dlatypov@google.com>
Signed-off-by: default avatarRicardo Ribalda <ribalda@chromium.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent aa1c0555
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment