STRUCT KUNIT_LOC(9)
β¨ struct kunit_loc(9) β¨
okay bestie, welcome to the Kernel API Manual π today's main character is struct kunit_loc, and honestly? she's giving "tiny but crucial." This one identifies the source location of a line of code. iykyk β like a little name tag for where a thing happened π
πΈ NAME πΈ
struct kunit_loc β identifies the source location of a line of code β¨
π¦ SYNOPSIS π¦
struct kunit_loc {
int line;
const char *file;
};
no cap, that's the whole struct. two members. she's lowkey minimal and that's her brand π
π Members π
lineβ the line number in the file. literally just the number of the line, bestie πfileβ the file name. which file? this file. the one we're talking about ποΈ
π₯ SEE ALSO π₯
Kernel file ./include/kunit/assert.h β go check her out, she's iconic π
enum kunit_assert_type(9)struct kunit_assert(9)struct kunit_fail_assert(9)struct kunit_unary_assert(9)struct kunit_ptr_not_err_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)
like, the whole assert friend group fr fr π«Ά
mwah π this page lives at ./include/kunit, it's the October 2026 edition, and yes β she's still signing her name struct kunit_loc(9) at the bottom like the queen she is πβ¨
π¦ 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