kunit_destroy_resource(9)
π kunit_destroy_resource π
okay bestie, welcome to the kunit_destroy_resource page from the Kernel API Manual β yes that's the vibe, we're in the kunit resource zone and honestly it's giving cleanup era β¨
πΈ NAME πΈ
kunit_destroy_resource β literally go find a kunit_resource and destroy it. that's it. that's the whole job. find + yeet π
β¨ SYNOPSIS β¨
int kunit_destroy_resource (struct kunit *test , kunit_resource_match_t
match , void *match_data );
she takes three things and returns an int, no cap π
π¦ ARGUMENTS π¦
testβ the test case that the resource belongs to. like, whose resource is this? this one's. πmatchβ the match function. it returns whether a given resource matchesmatch_data. basically the vibe check for resources πmatch_dataβ the data that gets passed intomatch. the little payload she hands over somatchcan do its thing π«Ά
β RETURN β
0β if thekunit_resourceis found and freed. slay, mission accomplished π₯-ENOENTβ if it's not found. she looked, bestie. it wasn't there. π
π SEE ALSO π
Kernel file ./include/kunit/resource.h β go read it, iykyk π
struct kunit_resource(9)kunit_get_resource(9)kunit_put_resource(9)__kunit_add_resource(9)kunit_add_resource(9)kunit_add_named_resource(9)kunit_alloc_and_get_resource(9)kunit_alloc_resource(9)kunit_resource_name_match(9)kunit_find_resource(9)kunit_find_named_resource(9)kunit_remove_resource(9)KUNIT_DEFINE_ACTION_WRAPPER(9)kunit_add_action(9)kunit_add_action_or_reset(9)kunit_remove_action(9)kunit_release_action(9)
the whole friend group fr fr π§π
k-unit bestie certified: source is./include/kunit, version dateOctober 2026β that's the era, periodt. now go free that resource ππΈ
π¦ 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