xe_kunit_hel...ve_test_init(9)
β¨ 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 livexe_deviceis 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 π
- Kernel file
./drivers/gpu/drm/xe/tests/xe_kunit_helpers.cβ the source, go read it, iykyk xe_kunit_helper_alloc_xe_device(9)xe_kunit_helper_xe_device_test_init(9)
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
- 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