Skip to content

Commit

Permalink
test: update tracepoint format
Browse files Browse the repository at this point in the history
The format has changed to provide more info to hotspot but the tests
still expected the old format. This patch updates the patch to use the
new format.
  • Loading branch information
lievenhey authored and milianw committed Jan 25, 2025
1 parent e64b883 commit 653ffd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/auto/shared/perfparsertestclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ void PerfParserTestClient::extractTrace(QIODevice *device)
checkAttribute(value.first);

if (eventType == TracePointSample) {
stream >> sample.tracePointData;
qint32 formatId;
stream >> formatId >> sample.tracePointData;
for (auto it = sample.tracePointData.constBegin(),
end = sample.tracePointData.constEnd();
it != end; ++it) {
Expand All @@ -183,9 +184,10 @@ void PerfParserTestClient::extractTrace(QIODevice *device)
qint32 id;
TracePointFormatEvent tracePointFormat;
stream >> id >> tracePointFormat.system >> tracePointFormat.name
>> tracePointFormat.flags;
>> tracePointFormat.flags >> tracePointFormat.format;
checkString(tracePointFormat.system);
checkString(tracePointFormat.name);
checkString(tracePointFormat.format);
QVERIFY(!m_tracePointFormats.contains(id));
m_tracePointFormats.insert(id, tracePointFormat);
break;
Expand Down
1 change: 1 addition & 0 deletions tests/auto/shared/perfparsertestclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class PerfParserTestClient : public QObject
qint32 system = -1;
qint32 name = -1;
quint32 flags = 0;
qint32 format = -1;
};

// Repeated here, as we want to check against accidental changes in enum values.
Expand Down

0 comments on commit 653ffd5

Please sign in to comment.