kunit_register_params_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… kunit_register_params_array β€” a Kernel API Manual moment πŸŽ€

okay so bestie, welcome to the kunit_register_params_array(9) page, and yes it's the Kernel API Manual, we're doing kernel API today, get comfy ✨


🌸 NAME 🌸

kunit_register_params_array β€” registers a parameter array for a KUnit test, that's the whole vibe πŸ’–


✨ SYNOPSIS ✨

kunit_register_params_array (test , array , param_count , get_desc );

like that's literally the whole call, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • test β€” the KUnit test structure that the parameters are getting added to. she's the main character, everything goes in her πŸ’…
  • array β€” an array of test parameters. yes bestie, an actual array of them 😭
  • param_count β€” number of parameters. the count. the amount. how many πŸ“
  • get_desc β€” a function that generates a string description for a given parameter element. it's giving "make it readable" energy ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so this macro initializes the test's parameter array data 🧚 it stores info including the parameter array, its count, the element size, and the parameter description function β€” all nestled inside test->params_array. iconic behavior, honestly 🌈


πŸ’€ NOTE πŸ’€

real talk though: if you're using this macro inside param_init, then kunit_array_gen_params will need to be manually provided as the parameter generator function to KUNIT_CASE_PARAM_WITH_INIT. kunit_array_gen_params is a KUnit function that uses the registered array to generate parameters. don't forget her, she's important πŸ™ˆ

⭐ SEE ALSO ⭐

Kernel file ./include/kunit/test.h β€” and the whole extended friend group, all of them, every single one, no skipping πŸ”₯


and that's the page bestie 🫢 shoutout to the ./include/kunit source and the October 2026 date stamp, they ate that fr fr πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from