On Mon, Feb 7, 2022 at 10:33 AM Ricardo Ribalda <ribalda@xxxxxxxxxxxx> wrote: > > Today, when we want to check if a pointer is NULL and not ERR we have > two options: > > EXPECT_TRUE(test, ptr == NULL); > > or > > EXPECT_PTR_NE(test, ptr, (struct mystruct *)NULL); > > Create a new set of macros that take care of NULL checks. I think we've usually had people do KUNIT_EXPECT_FALSE(test, nullptr); I'm not personally against having an explicit NULL check, however. But if we want to continue with this, we'll want to rebase on top of https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/?h=kunit since a lot of this code has been deleted or refactored. E.g. see https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/tree/include/kunit/test.h?h=kunit