FIXTURE_VARIANT_ADD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 FIXTURE_VARIANT_ADD(9) β€” NAME 🌸

okay so welcome to the FIXTURE_VARIANT_ADD(9) page from the Kernel API Manual, bestie πŸ’– this one is called once per fixture variant to setup and register the data, and it's lowkey iconic.


✨ SYNOPSIS ✨

       FIXTURE_VARIANT_ADD (fixture_name , variant_name );

πŸŽ€ ARGUMENTS πŸŽ€

  • fixture_name β€” fixture name, periodt.
  • variant_name β€” name of the parameter set, iykyk.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the whole vibe:

           FIXTURE_VARIANT_ADD(fixture_name, variant_name) {
             .property1 = val1,
             ...
           };

this defines a variant of the test fixture, and that variant gets provided to FIXTURE_SETUP and TEST_F as variant. Tests of each fixture will be run once for each variant β€” yes, every single one, no cap 🫢


πŸ’œ SEE ALSO πŸ’œ

go read these too, bestie:


mwah πŸ’‹ β€” source/version: ./tools/testing/selftests Β· date: October 2026.

πŸ“¦ where this page comes from