ASSERT_STREQ(9)
π ASSERT_STREQ β the kernel API manual, bestie edition β¨
okay so real talk, this is a page from the Kernel API Manual, section 9, and it's a short one β but every crumb of it is here, promise π«Ά
πΈ NAME πΈ
ASSERT_STREQ β and that's... literally it, bestie π the original has the dash and then nothing after it. No description, no tagline, the NAME line just trails off like a text message you forgot to finish. So we move on π
β¨ SYNOPSIS β¨
ASSERT_STREQ (expected , seen );
that's the whole vibe check β you call it, you give it two things, and it does its little check π
π¦ ARGUMENTS π¦
expectedβ the expected value π like, this is the one you're manifestingseenβ the measured value πΈ aka the one reality actually handed you
π DESCRIPTION π
ASSERT_STREQ(expected, measured): !strcmp(expected, measured)
so basically π it's !strcmp on the two strings β you pass in what you wanted (expected) and what you got (measured), and it does the comparing for you. no cap, that's the entire bit π§
ngl the signature here saysexpected , seenup top and then the description calls the second onemeasuredβ that's just how the original rolls, so don't come for me, I'm reporting it verbatim π
π₯ SEE ALSO π₯
the whole friend group shows up for this one, fr fr π
- 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_TRUE(9)ASSERT_FALSE(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 π short, sweet, and extremely to-the-point β main character energy honestly π
sign-off time π«Ά this little beauty lives under the source path ./tools/testing/selftests and it's dated October 2026 β so go forth and compare those strings, 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