STRUCT KUNIT_PTR_NOT_ERR_ASSERT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct kunit_ptr_not_err_assert β€” Kernel API Manual ✨

okay so bestie, welcome to the <pink>Kernel API Manual</pink> πŸŽ€ β€” today's hyperfixation is struct kunit_ptr_not_err_assert(9) and honestly? she's iconic. lowkey a little niche, highkey essential. let's get into it 🫢


🌸 NAME 🌸

struct kunit_ptr_not_err_assert β€” it's an expectation/assertion that a pointer is not NULL and not a -errno. that's the whole vibe. no cap πŸ’…


✨ SYNOPSIS ✨

struct kunit_ptr_not_err_assert {
    struct kunit_assert assert;
    const char *text;
    const void *value;
 };

like, look at her. three fields. flawless. periodt πŸ‘‘


πŸ¦‹ Members πŸ¦‹

  • assert β€” the parent of this type. she's giving main character energy but she's literally the parent, so respect the lineage fr fr 🌈
  • text β€” a string representation of the expression that got passed to the expectation. iykyk, it's the receipts of what you actually wrote πŸ“
  • value β€” the actual evaluated pointer value of the expression. the real one. the one that gets the vibe check πŸ”₯

πŸ’– Description πŸ’–

so basically: this struct represents an expectation/assertion that a pointer is not null and does not contain a -errno. that's it, that's the whole personality ✨

(See IS_ERR_OR_NULL.) β€” yes bestie, go look at it, it's right there πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, no gatekeeping 🫢

  • kernel file ./include/kunit/assert.h
  • enum kunit_assert_type(9)
  • struct kunit_loc(9)
  • struct kunit_assert(9)
  • struct kunit_fail_assert(9)
  • struct kunit_unary_assert(9)
  • struct kunit_binary_assert_text(9)
  • struct kunit_binary_assert(9)
  • struct kunit_binary_ptr_assert(9)
  • struct kunit_binary_str_assert(9)
  • struct kunit_mem_assert(9)

and that's the page, bestie!! πŸ§šπŸ’œ this little gem lives in ./include/kunit, dated October 2026, and she answers to the name struct kuni...t_err_assert(9). mwah πŸ’‹ go test some pointers, slay, and remember: not NULL, not -errno, no exceptions πŸ”₯β­πŸ“

πŸ“¦ where this page comes from