KUNIT_EXPECT_NOT_NULL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

Okay so this is the KUNIT_EXPECT_NOT_NULL page from the Kernel API Manual β€” manual name folded in near the top like a little name tag 🫢. Short version: it expects that @ptr is not null. Not me being obsessed with pointer existence, but here we are πŸ’….

✨ SYNOPSIS ✨

KUNIT_EXPECT_NOT_NULL (test , ptr );

πŸŽ€ ARGUMENTS πŸŽ€

  • test β€” The test context object. It’s the main-character container for the test context, no cap.
  • ptr β€” an arbitrary pointer. Literally any pointer, bestie. πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

So KUNIT_EXPECT_NOT_NULL sets an expectation that the value that ptr evaluates to is not null. This is semantically equivalent to KUNIT_EXPECT_PTR_NE(test, ptr, NULL) β€” same energy, different spelling. See KUNIT_EXPECT_TRUE for more information.

bestie note: the original says to see KUNIT_EXPECT_TRUE for more information, so that’s the next little rabbit hole if you want extra deets πŸ‡βœ¨

πŸ¦‹ SEE ALSO πŸ¦‹

When you’re done, go read these icons:


okay that’s the whole page, mwah πŸ’‹ β€” source/version: ./include/kunit Β· date: October 2026 Β· page: KUNIT_EXPECT_NOT_NULL(9). byeee bestie πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from