STRUCT KUNIT_UNARY_ASSERT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct kunit_unary_assert(9)

okay so bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct kunit_unary_assert, and honestly? it's giving "simple but crucial" and we're obsessed πŸŽ€

🌸 NAME 🌸

struct kunit_unary_assert β€” literally the struct that represents a KUNIT_{EXPECT|ASSERT}_{TRUE|FALSE} πŸ’– no cap, that's the whole vibe.

✨ SYNOPSIS ✨

struct kunit_unary_assert {
    struct kunit_assert assert;
    const char *condition;
    bool expected_true;
};

πŸ¦‹ Members πŸ¦‹

  • assert β€” the parent of this type, fr fr. every good struct has a parent and this one's is struct kunit_assert 🫢
  • condition β€” a string representation of a conditional expression. like, the actual condition but as a string, iykyk πŸ’…
  • expected_true β€” true if it's of type KUNIT_{EXPECT|ASSERT}_TRUE, and false otherwise. that's it, that's the whole bool 🌈

πŸ”₯ Description πŸ”₯

so here's the tea β˜• β€” this struct represents a simple expectation or assertion that just asserts something is true or false. In other words (and the original is very clear about this, so we're keeping it exactly):

Represents the expectations: KUNIT_{EXPECT|ASSERT}_{TRUE|FALSE}

like, it's not doing the most, it's just showing up and checking a boolean. main character energy honestly πŸ‘‘ periodt.

πŸŽ€ SEE ALSO πŸŽ€

  • Kernel file ./include/kunit/assert.h
  • enum kunit_assert_type(9)
  • struct kunit_loc(9)
  • struct kunit_assert(9)
  • struct kunit_fail_assert(9)
  • struct kunit_ptr_not_err_assert(9)
  • struct kunit_binary_assert_text(9)
  • struct kunit_binary_assert(9)
  • struct kunit_binary_ptr_assert(9)
  • struct kunit_binary_str_assert(9)
  • struct kunit_mem_assert(9)

and that's the whole page bestie!! πŸ“ mwah πŸ’‹ this one came from ./include/kunit, dated October 2026, and it's filed under struct kunit_unary_assert(9) β€” go forth and assert your little heart out πŸ§šπŸ’œ

πŸ“¦ where this page comes from