test__sample_parsing(9)
π 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 incompletesubtestβ-- 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
- 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