xe_kunit_he...ce_test_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so welcome to the Kernel API Manual, bestie πŸ’– β€” today’s page is xe_kunit_he...ce_test_init(9), and the function it’s hyping is xe_kunit_helper_xe_device_test_init β€” Prepare a &xe_device for a KUnit test. ✨


✨ SYNOPSIS ✨

int xe_kunit_helper_xe_device_test_init (struct kunit *test );

🧚 ARGUMENTS 🧚

  • test β€” the kunit where this fake xe_device will be used 🫢

πŸ’… DESCRIPTION πŸ’…

okay so this function allocates and initializes a fake xe_device, then stores its pointer as kunit.priv so the test code can get at it later πŸ’– no cap, that’s the whole vibe.

This function can be used directly as a custom implementation of kunit_suite.init β€” iconic, honestly πŸ‘‘

It’s also possible to prepare a specific variant of the fake xe_device by passing in a kunit.priv pointer to the struct xe_pci_fake_data supplemented with desired parameters prior to calling this function πŸŽ€

And heads up: this function uses KUNIT_ASSERT to detect any failures. It’s not shy about it, fr fr πŸ’€


🌈 RETURN 🌈

Always 0. literally always β€” periodt πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹


mwah πŸ’‹ sign-off time: the source/version line says ./drivers/gpu/drm/xe/tests, the date is October 2026, and the page title is xe_kunit_he...ce_test_init(9) β€” slay, bye bestie 🌸

πŸ“¦ where this page comes from