STRUCT KUNIT_ATTR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct kunit_attr(9) πŸ’–

okay bestie, welcome to the Kernel API Manual entry for struct kunit_attr β€” it's giving β€œrepresents a test attribute and holds flexible helper functions to interact with attribute.” πŸ’… No cap, this is the lil’ struct bundle for test-attribute vibes and helper functions. ✨


✨ SYNOPSIS ✨

       struct kunit_attr {
           const char *name;
           void *(*get_attr)(void *test_or_suite, bool is_test);
           const char *(*to_string)(void *attr, bool *to_free);
           int (*filter)(void *attr, const char *input, int *err);
           void *attr_default;
           enum print_ops print;
        };

πŸ’… Members πŸ’…

  • name β€” name of test attribute, eg. speed πŸƒβ€β™€οΈπŸ’¨
  • get_attr β€” function to return attribute value given a test πŸ”
  • to_string β€” function to return string representation of given attribute value πŸ”‘
  • filter β€” function to indicate whether a given attribute value passes a filter 🧚
  • attr_default β€” default attribute value used during filtering πŸŽ€
  • print β€” value of enum print_ops to indicate when to print attribute πŸ–¨οΈβœ¨

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./lib/kunit/attributes.c β€” bestie, that’s the spot. 🫢


mwah πŸ’‹ β€” sourced from ./lib/kunit, version/date: October 2026. πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from