diff --git a/tests/integrationtests/perf.data.PerfFormatLost b/tests/integrationtests/perf.data.PerfFormatLost new file mode 100644 index 000000000..04605d8af Binary files /dev/null and b/tests/integrationtests/perf.data.PerfFormatLost differ diff --git a/tests/integrationtests/tst_perfparser.cpp b/tests/integrationtests/tst_perfparser.cpp index a0a78a940..421c82bab 100644 --- a/tests/integrationtests/tst_perfparser.cpp +++ b/tests/integrationtests/tst_perfparser.cpp @@ -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;