xe_kunit_hel...ve_test_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

xe_kunit_helper_xe_device_live_test_init β€” okay so this is the function that gets a &xe_device all prepped and ready for a live KUnit test πŸŽ€

So this page is from the Kernel API Manual (yes, that's the manual name, we're being official today πŸ’…), and the star of the show is xe_kunit_helper_xe_device_live_test_init.


🌸 SYNOPSIS 🌸

int xe_kunit_helper_xe_device_live_test_init (struct kunit *test );

Literal icon behaviour, no cap.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • test β€” the kunit where the live xe_device is gonna get used. That's it, that's the whole argument, bestie πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

Okay so here's the vibe: this function expects a pointer to the xe_device sitting in test.param_value, exactly like it's prepared by xe_pci_live_device_gen_param, and then it stores that pointer as kunit.priv so your test code can go grab it whenever it needs it. Very main character of it 🫢

Then it makes sure the device is not wedged, and after that it resumes it β€” the whole point being so you don't end up waking the device up from inside your test. It uses a deferred cleanup action to release a runtime_pm reference, so that reference gets handled for you. Slay.

Also, good to know: this function can be used as a custom implementation of kunit_suite.init. And it uses KUNIT_ASSERT to detect any failures β€” so if something's off, it's gonna assert, not silently vibe through it 😭


⭐ RETURN ⭐

Always 0. Iconic, consistent, zero drama πŸ’€


🌈 SEE ALSO 🌈


And that's the whole page, bestie! πŸ’œ This little gem lives in ./drivers/gpu/drm/xe/tests and it's dated October 2026 β€” so mark your calendars, it's a certified classic πŸŽ€βœ¨πŸ‘‘

πŸ“¦ where this page comes from