test__sample_parsing(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… test__sample_parsing(9) β€” like, the kernel API manual, bestie ✨

Okay so real quick before we dive in: this is test__sample_parsing from the section 9 kernel API manual, and honestly? She's a whole little vibe check for your perf sample parser. Let's get into it πŸŽ€


✨ NAME ✨

test__sample_parsing β€” test sample parsing. That's it, that's the gig, no cap 🫢


🌸 SYNOPSIS 🌸

int test__sample_parsing (struct test_suite *test , int subtest );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • test β€” -- undescribed -- 😭 bestie the docs simply did not describe her, we don't know, it's a mystery, the lore is incomplete
  • subtest β€” -- undescribed -- πŸ™ˆ same situation, equally mysterious, we're just reporting the facts here
ngl the original really said "undescribed" for both and left it at that. Iconic laziness, honestly πŸ’€

πŸ’– DESCRIPTION πŸ’–

So here's what this function actually does, and it ATE:

This function implements a test that synthesizes a sample event, parses it, and then checks that the parsed sample matches the original sample. Like, it makes a sample out of thin air, runs it through the parser, and then is like "okay but is this the same sample we started with" β€” main character energy πŸ”₯

The test checks sample format bits separately and together, because she's thorough like that πŸ’…

Now the important part, the grading system: if the test passes, 0 is returned. Otherwise, -1 is returned. That's the whole deal β€” 0 slay, -1 not slay 🌈


⭐ SEE ALSO ⭐

  • Kernel file ./tools/perf/tests/sample-parsing.c β€” go read the source, iykyk πŸ‘‘

Alright bestie, that's the page πŸ’œ This cutie comes to you from the ./tools/perf/tests manual, dated October 2026 β€” go forth, parse those samples, and remember: 0 is the goal, -1 is the villain arc πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from