Skip to content

Commit

Permalink
added test for PERF_FORMAT_LOST attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch committed Jan 2, 2024
1 parent 8fa8730 commit fd75a39
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Binary file added tests/integrationtests/perf.data.PerfFormatLost
Binary file not shown.
15 changes: 15 additions & 0 deletions tests/integrationtests/tst_perfparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,21 @@ private slots:
}
}

/* tests a perf file that has data with PERF_FORMAT_LOST attribute, see KDAB/hotspot#578 */
void testPerfFormatLost()
{
PerfParser parser(this);
QSignalSpy parsingFailedSpy(&parser, &PerfParser::parsingFailed);
QSignalSpy parsingFinishedSpy(&parser, &PerfParser::parsingFinished);

parser.startParseFile(QFINDTESTDATA("perf.data.PerfFormatLost"));

// CHECKME: hotspot-perfparser alone needs < 0.2 seconds to parse this file,
// hotpsot needs < 1 second to open it - why does the unwind take so long during the test?
QTRY_COMPARE_WITH_TIMEOUT(parsingFinishedSpy.count(), 1, 58000);
QCOMPARE(parsingFailedSpy.count(), 0);
}

void testCppInliningNoOptions()
{
const QStringList perfOptions;
Expand Down

0 comments on commit fd75a39

Please sign in to comment.