KUNIT_EXPECT_MEMEQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… KUNIT_EXPECT_MEMEQ(9) πŸ’…

okay bestie, welcome to the Kernel API Manual page for KUNIT_EXPECT_MEMEQ(9) ✨ this is the one where we check whether the first @size bytes of @left and @right are equal, and honestly? iconic.


πŸ’– NAME πŸ’–

KUNIT_EXPECT_MEMEQ β€” expects that the first @size bytes of @left and @right are equal. no cap, that's the whole assignment. 🫢

✨ SYNOPSIS ✨

KUNIT_EXPECT_MEMEQ (test , left , right , size );

πŸŽ€ ARGUMENTS πŸŽ€

  • test β€” the test context object. it's the main character context, periodt. πŸ‘‘
  • left β€” an arbitrary expression that evaluates to the specified size. πŸ’œ
  • right β€” an arbitrary expression that evaluates to the specified size. πŸ’œ
  • size β€” number of bytes compared. that's the vibe-check length, bestie. πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

Sets an expectation that the values that left and right evaluate to are equal. this is semantically equivalent to KUNIT_EXPECT_TRUE(test, !memcmp((left), (right), (size))), which is giving "same bytes, no drama" energy. see KUNIT_EXPECT_TRUE for more information. πŸ’–

Although this expectation works for any memory block, it is not recommended for comparing more structured data, such as structs. like, it can do it, but it's not the serve for that, bestie. this expectation is recommended for comparing, for example, data arrays. yes, arrays ate. πŸ“

πŸ’– SEE ALSO πŸ’–

Kernel file: ./include/kunit/test.h β€” and here's the whole friend group, no cap:


made with love from the ./include/kunit source vibe, dated October 2026, stamped with the KUNIT_EXPECT_MEMEQ(9) page-name energy β€” xoxo, your kernel girlie πŸ’…βœ¨

πŸ“¦ where this page comes from