KUNIT_EXPECT_NULL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… KUNIT_EXPECT_NULL ✨

okay bestie, welcome to the kernel API manual, section 9 β€” this one's about KUNIT_EXPECT_NULL, and honestly? she's a little icon of a macro πŸŽ€


🌸 NAME 🌸

KUNIT_EXPECT_NULL β€” literally just: "expects that @ptr is null." that's it. that's the whole vibe check. πŸ’€


✨ SYNOPSIS ✨

KUNIT_EXPECT_NULL (test , ptr );

no cap, that's the entire call. two things go in, nothing comes out except ✨judgement✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • test β€” the test context object, aka the main character of your test suite πŸ‘‘
  • ptr β€” an arbitrary pointer. any pointer. she's just some girl. we're checking if she's null 🫢

πŸ’– DESCRIPTION πŸ’–

so what this does: it sets an expectation that the value that ptr evaluates to is null. that's the assignment. that's the mission. βœ…

and the tea? it's semantically equivalent to:

KUNIT_EXPECT_PTR_EQ(test, ptr, NULL)

like, same energy, different font. πŸ’… if you wanna know more, see KUNIT_EXPECT_TRUE β€” she's the one with all the lore ✨


🌈 SEE ALSO 🌈

okay this list is long long, so buckle up bestie, we're going on a journey through ./include/kunit/test.h 🧚

like I said. long long. go read one of them, iykyk πŸ“šπŸ’œ


okay so real talk: the only source file for this whole thing is ./include/kunit/test.h β€” that's where the magic lives, bestie 🏠✨

and that's the whole page fr fr 🫢 this was KUNIT_EXPECT_NULL(9) from the kernel API manual, straight out of ./include/kunit, dated October 2026 β€” slay, iconic, no notes πŸ’…πŸŽ€β­

πŸ“¦ where this page comes from