kunit_softw...r_node_group(9)
π kunit_software_node_register_node_group β a Kernel API Manual moment β¨
okay so bestie, we're in the Kernel API Manual today and this one is honestly such a slay little helper π«Ά it's giving "register a kunit-managed software node group" and the whole vibe is that the test framework cleans up after you so you don't have to ππ
β¨ NAME β¨
kunit_software_node_register_node_group β register a kunit-managed software node group, periodt π
πΈ SYNOPSIS πΈ
int kunit_software_node_register_node_group(struct kunit *test,
const struct software_node *const *nodes);
like. that's the whole signature. no cap. π
π¦ ARGUMENTS π¦
testβ the test context π§ͺ like, the test that's gonna own this whole situationnodesβ the software node group you're registering π« yes, the actual group
π DESCRIPTION π
So what this does is register a test-managed software node group. The nodes get unregistered after the test case completes β the framework literally handles the cleanup for you, which is highkey iconic πβ¨ no manual teardown, no leaks, just vibes π
β RETURN β
0on success π- a negative error number on failure π (so, like, check it, bestie)
π₯ SEE ALSO π₯
- Kernel file
./lib/kunit/fwnode.cβ the source, go read it iykyk π kunit_fwnode_create_software_node(9)kunit_software_node_register(9)kunit_device_add_software_node(9)
ngl the nodes are unregistered after the test case completes β that's the whole point, don't go trying to unregister them yourself and ruin the main character energy π
okay that's the page!! π it lives in ./lib/kunit, dated October 2026, and it's literally the softest little registration function in the Kernel API Manual ππ bye bestie, go write some tests π§β¨
π¦ 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