STRUCT KUNIT_BINARY_ASSERT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

struct kunit_binary_assert(9) β€” Kernel API Manual ✨

🌸 NAME 🌸

struct kunit_binary_assert β€” the Kernel API Manual struct for an expectation/assertion that compares two non-pointer values (for example, KUNIT_EXPECT_EQ(test, 1 + 1, 2)).

πŸͺ„ SYNOPSIS πŸͺ„

Okay bestie, here’s the shape of it, no cap:

       struct kunit_binary_assert {
           struct kunit_assert assert;
           const struct kunit_binary_assert_text *text;
           long long left_value;
           long long right_value;
        };

🧩 Members 🫢

  • assert β€” the parent of this type. It’s giving β€œfamily tree” energy.
  • text β€” holds the textual representations of the operands and op (e.g. "=="). Literally the receipts for what got compared.
  • left_value β€” the actual evaluated value of the expression in the left slot.
  • right_value β€” the actual evaluated value of the expression in the right slot.

πŸ’– Description πŸ’–

Represents an expectation/assertion that compares two non-pointer values. For example, to expect that 1 + 1 == 2, you can use the expectation KUNIT_EXPECT_EQ(test, 1 + 1, 2); β€” iconic behavior, honestly.

πŸ‘€ SEE ALSO πŸ‘€

Go peek at these too, bestie:

  • 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_unary_assert(9)
  • struct kunit_ptr_not_err_assert(9)
  • struct kunit_binary_assert_text(9)
  • struct kunit_binary_ptr_assert(9)
  • struct kunit_binary_str_assert(9)
  • struct kunit_mem_assert(9)

Okay that’s the page, bestie! Source/version ./include/kunit, dated October 2026, page struct kunit_binary_assert(9) β€” mwah, go slay those kernel tests πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from