kunit_destroy_resource(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 matches match_data. basically the vibe check for resources πŸ’€
  • match_data β€” the data that gets passed into match. the little payload she hands over so match can do its thing 🫢

⭐ RETURN ⭐

  • 0 β€” if the kunit_resource is 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 πŸ“–

the whole friend group fr fr πŸ§šπŸ’œ


k-unit bestie certified: source is ./include/kunit, version date October 2026 β€” that's the era, periodt. now go free that resource πŸ’–πŸŒΈ
πŸ“¦ where this page comes from