kunit_fail_current_test(9)
π kunit_fail_current_test β the Kernel API Manual, bestie edition π
okay so welcome to the Kernel API Manual, specifically the page for kunit_fail_current_test(9), and honestly? she's a lil icon. sit down, grab a strawberry π, let's get into it.
β¨ NAME β¨
kunit_fail_current_test β if a KUnit test is running, fail it. that's it. that's the whole vibe. no cap. π
π¦ SYNOPSIS π¦
kunit_fail_current_test (fmt , ... );
π ARGUMENTS π
fmtβ lowkey the manpage just says -- undescribed -- π so like... bestie, we don't have lore on this one. it's there, it's a parameter, that's what we know. π«Ά...β variable arguments, aka the little squad of extras that come along for the ride β¨
πΈ DESCRIPTION πΈ
so here's the tea: if a KUnit test is running in the current task, mark that test as failed. that's the whole job. she clocks in, she checks if there's a test running in the current task, and if there is β boom, that test is marked failed. main character energy, honestly. π
π₯ SEE ALSO π₯
- Kernel file
./include/kunit/test-bug.h kunit_get_current_test(9)kunit_is_suppressed_warning(9)
go read those next, iykyk π§
and that's the page!! source: ./include/kunit, dated October 2026, living in the Kernel API Manual β mwah, love u, go fail some tests (the controlled way) πππ
π¦ 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