KUNIT_CASE_PARAM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so welcome to KUNIT_CASE_PARAM(9) from the Kernel API Manual ✨ bestie, this one is literally a helper for creation a parameterized &struct kunit_case β€” yes, that's the official wording, and we're keeping it πŸ’…


✨ SYNOPSIS ✨

KUNIT_CASE_PARAM (test_name , gen_params );

πŸŽ€ ARGUMENTS πŸŽ€

  • test_name β€” a reference to a test case function.
  • gen_params β€” a reference to a parameter generator function.

πŸ¦‹ DESCRIPTION πŸ¦‹

The generator function:

const void* gen_params(const void *prev, char *desc)

is used to lazily generate a series of arbitrarily typed values that fit into a void*. The argument prev is the previously returned value, which should be used to derive the next value; prev is set to NULL on the initial generator call. When no more values are available, the generator must return NULL. Optionally write a string into desc (size of KUNIT_PARAM_DESC_SIZE) describing the parameter. πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./include/kunit/test.h β€” and the whole iconic cross-ref squad is here, no cap:


xoxo bestie πŸ’… source/version: ./include/kunit; dated October 2026; manual: KUNIT_CASE_PARAM(9). slay and read responsibly 🫢✨

πŸ“¦ where this page comes from