KUNIT_ASSERT..._ERR_OR_NULL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– KUNIT_ASSERT..._ERR_OR_NULL(9) πŸ’–

Hey bestie, welcome to the Kernel API Manual page for KUNIT_ASSERT..._ERR_OR_NULL(9) β€” aka the page all about KUNIT_ASSERT_NOT_ERR_OR_NULL. Pointer vibe check incoming πŸ’…βœ¨


✨ NAME ✨

KUNIT_ASSERT_NOT_ERR_OR_NULL β€” an assertion that @ptr is not null and not err. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

KUNIT_ASSERT_NOT_ERR_OR_NULL (test , ptr );

πŸ’… ARGUMENTS πŸ’…

  • test β€” the test context object.
  • ptr β€” an arbitrary pointer.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this one sets an assertion that the value that ptr evaluates to is not null and not an errno stored in a pointer. No cap, that's the whole vibe check 🫢

It's literally the same as KUNIT_EXPECT_NOT_ERR_OR_NULL, except β€” plot twist β€” it causes an assertion failure (see KUNIT_ASSERT_TRUE) when the assertion is not met 😭πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/kunit/test.h, and then the whole iconic KUnit friend group:


Catch you later, bestie! This page came from ./include/kunit, dated October 2026, and it's the KUNIT_ASSERT..._ERR_OR_NULL(9) manual page. Stay iconic πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from