Skip to content

Commit

Permalink
add test for PERF_FORMAT_LOST attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch authored and milianw committed Jan 13, 2024
1 parent 0df0055 commit 4b7c378
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added tests/integrationtests/perf.data.PerfFormatLost
Binary file not shown.
13 changes: 13 additions & 0 deletions tests/integrationtests/tst_perfparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,19 @@ 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"));

QTRY_COMPARE_WITH_TIMEOUT(parsingFinishedSpy.count(), 1, 58000);
QCOMPARE(parsingFailedSpy.count(), 0);
}

void testCppInliningNoOptions()
{
const QStringList perfOptions;
Expand Down

0 comments on commit 4b7c378

Please sign in to comment.