EXPECT_TRUE(9)
π EXPECT_TRUE(9) π
okay so bestie, we're looking at EXPECT_TRUE, a kernel API manual page from the Kernel API Manual β yes that's the manual name, it lives in section 9, and honestly? it's giving "tiny function, big harness energy" β¨
It's one of those kselftest harness macros that checks stuff for you and then keeps going instead of bailing, iykyk.
πΈ NAME πΈ
EXPECT_TRUE β literally that's it, the original page leaves the description blank, so I'm not gonna invent one for you π«Ά
β¨ SYNOPSIS β¨
EXPECT_TRUE (seen );
π ARGUMENTS π
seenβ the measured value. that's the thing you're checking, bestie π
π¦ DESCRIPTION π¦
Okay so the whole vibe is:
EXPECT_TRUE(measured): 0 != measured
Which means: you hand it measured, and the check is that measured is not equal to 0. zero = not it. anything else = slay πβ¨
π SEE ALSO π
the full squad, no gatekeeping π
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_GT(9)EXPECT_GE(9)EXPECT_NULL(9)EXPECT_FALSE(9)EXPECT_STREQ(9)EXPECT_STRNE(9)XFAIL_ADD(9)
not me ending this with the cutest little sign-off ever: this page is from ./tools/testing/selftests, dated October 2026. 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