ASSERT_GT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ASSERT_GT(9) ✨

okay so real talk β€” the name line on this one is literally just ASSERT_GT with a big fat nothing after the dash 🫠 no description, no blurb, just vibes. bestie said "I'll let the macro speak for itself." iconic behavior honestly πŸ‘‘

it lives in the Kernel API Manual, section 9, and it's one of the kselftest harness assertion girlies πŸ’…


🌸 SYNOPSIS 🌸

ASSERT_GT (expected , seen );

that's it. that's the whole call. two args, no notes πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • expected β€” the expected value πŸ’– like, what you think the number should be, your hopes and dreams in variable form
  • seen β€” the measured value 🌸 the actual reality, what the code actually coughed up

πŸ”₯ DESCRIPTION πŸ”₯

ASSERT_GT(expected, measured): expected > measured

so the whole entire personality of this macro is: it asserts that expected is greater than measured. no cap, that's the vibe check πŸ’€

(note: the arg list up top calls the second one seen, and the description calls it measured β€” same girl, different wig. iykyk 🧚)

it's an assert, so it's the strict, no-take-backs, this must be true or we have a Problem flavor of check β€” that's the energy of an ASSERT_ in this family, and that's the difference between it and the EXPECT_ girlies in the SEE ALSO list below πŸ‘€


⭐ SEE ALSO ⭐

go read these next, they're all part of the same friend group 🫢

  • Kernel file ./tools/testing/selftests/kselftest_harness.h example(9)
  • TH_LOG(9)
  • SKIP(9)
  • TEST(9)
  • TEST_SIGNAL(9)
  • FIXTURE_DATA(9)
  • FIXTURE(9)
  • FIXTURE_SETUP(9)
  • FIXTURE_TEARDOWN(9)
  • FIXTURE_TEARDOWN_PARENT(9)
  • FIXTURE_VARIANT(9)
  • FIXTURE_VARIANT_ADD(9)
  • TEST_F(9)
  • TEST_HARNESS_MAIN(9)
  • operators(9)
  • ASSERT_EQ(9)
  • ASSERT_NE(9)
  • ASSERT_LT(9)
  • ASSERT_LE(9)
  • ASSERT_GE(9)
  • ASSERT_NULL(9)
  • ASSERT_TRUE(9)
  • ASSERT_FALSE(9)
  • ASSERT_STREQ(9)
  • ASSERT_STRNE(9)
  • EXPECT_EQ(9)
  • EXPECT_NE(9)
  • EXPECT_LT(9)
  • EXPECT_LE(9)
  • EXPECT_GT(9)
  • EXPECT_GE(9)
  • EXPECT_NULL(9)
  • EXPECT_TRUE(9)
  • EXPECT_FALSE(9)
  • EXPECT_STREQ(9)
  • EXPECT_STRNE(9)
  • XFAIL_ADD(9)

and that's the whole page bestie, no crumbs left 🌈 this lil guy comes to you from the ./tools/testing/selftests corner of the kernel tree, dated October 2026, and it ate. periodt. πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from