STRUCT KUNIT_BINARY_ASSERT(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms