EXPECT_GT(9)
π EXPECT_GT(9) π
okay so bestie, welcome to the Kernel API Manual β¨ this one's a macro page, it's short, it's iconic, let's go π
πΈ NAME πΈ
EXPECT_GT β and that's literally it, the original page leaves the description blank after the dash, so no cap, there's no tagline here π the name is the whole personality.
β¨ SYNOPSIS β¨
EXPECT_GT (expected , seen );
that's the whole thing. yes the spacing is like that. we don't ask questions, we just copy it exactly π«Ά
π¦ ARGUMENTS π¦
expectedβ the expected value, aka the number you think it should be πseenβ the measured value, aka the number reality actually handed you π
ngl the ARGUMENTS section calls the second oneseenand then DESCRIPTION calls itmeasured. that's just how the page is written, i'm not fixing it, i'm just telling you so you're not confused π
π DESCRIPTION π
here's the whole vibe, one line:
EXPECT_GT(expected, measured): expected > measured
so it's checking that expected is strictly greater than measured π₯ that's it. that's the macro. she's simple, she's serving, she works π
π SEE ALSO π
the full squad, in order, no one left out π«Ά:
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_GT(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_GE(9)EXPECT_NULL(9)EXPECT_TRUE(9)EXPECT_FALSE(9)EXPECT_STREQ(9)EXPECT_STRNE(9)XFAIL_ADD(9)
like, the whole friend group showed up to the function π literally every ASSERT_* and EXPECT_* you could want, plus the fixture girlies and operators(9) for the lore π§
okay that's the page!! short and sweet, main character energy in four sections β
sign-off time π this lil page lives in ./tools/testing/selftests and it's dated October 2026 β yes, 2026, she's from the future, we support her π
π¦ 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