STRUCT KUNIT_PTR_NOT_ERR_ASSERT(9)
π
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms