ASSERT_TRUE(9)
π ASSERT_TRUE π
okay so bestie, welcome to the Kernel API Manual β¨ β this is ASSERT_TRUE(9), and she's lowkey one of the most straightforward little icons in the whole kselftest harness. no cap, this one's a snack π
πΈ NAME πΈ
ASSERT_TRUE β
and that's it. that's the whole description. the manpage said "ASSERT_TRUE -" and then just stopped. not me staring at an empty NAME field π she's mysterious, she's minimal, she's giving main character energy with zero backstory π
β¨ SYNOPSIS β¨
ASSERT_TRUE (seen );
π ARGUMENTS π
seenβ the measured value, bestie. that's the thing you're putting on trial here π
π¦ DESCRIPTION π¦
okay so the whole vibe, literally the entire vibe, is this:
ASSERT_TRUE(measured): measured != 0
that's it. that's the flex. you hand her a value and she goes "is this thing not zero??" and if your measured value IS zero, she does not let it slide π she's the literal truth-checker of the test harness, the vibe check in function form, and honestly? she ate π
β SEE ALSO β
the whole friend group π«Ά go say hi:
- 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_GT(9)ASSERT_GE(9)ASSERT_NULL(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 bugs, no warnings, no exit statuses β just pure, unbothered, != 0 energy π
this lil masterpiece lives under ./tools/testing/selftests, and it was dated October 2026 β so yeah, she's from the future and she's still just checking if stuff isn't zero ππ
ily, go write your tests π«Άπ
π¦ 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