ASSERT_GT(9)
β¨ 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 formseenβ 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.hexample(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
- 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