aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/sample-parsing.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/sample-parsing.c')
-rw-r--r--tools/perf/tests/sample-parsing.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 77f598dbd97a..1b677202638d 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -121,6 +121,9 @@ static bool samples_same(const struct perf_sample *s1,
121 if (type & PERF_SAMPLE_DATA_SRC) 121 if (type & PERF_SAMPLE_DATA_SRC)
122 COMP(data_src); 122 COMP(data_src);
123 123
124 if (type & PERF_SAMPLE_TRANSACTION)
125 COMP(transaction);
126
124 return true; 127 return true;
125} 128}
126 129
@@ -165,6 +168,7 @@ static int do_test(u64 sample_type, u64 sample_regs_user, u64 read_format)
165 .cpu = 110, 168 .cpu = 110,
166 .raw_size = sizeof(raw_data), 169 .raw_size = sizeof(raw_data),
167 .data_src = 111, 170 .data_src = 111,
171 .transaction = 112,
168 .raw_data = (void *)raw_data, 172 .raw_data = (void *)raw_data,
169 .callchain = &callchain.callchain, 173 .callchain = &callchain.callchain,
170 .branch_stack = &branch_stack.branch_stack, 174 .branch_stack = &branch_stack.branch_stack,
@@ -273,10 +277,11 @@ int test__sample_parsing(void)
273 277
274 /* 278 /*
275 * Fail the test if it has not been updated when new sample format bits 279 * Fail the test if it has not been updated when new sample format bits
276 * were added. 280 * were added. Please actually update the test rather than just change
281 * the condition below.
277 */ 282 */
278 if (PERF_SAMPLE_MAX > PERF_SAMPLE_IDENTIFIER << 1) { 283 if (PERF_SAMPLE_MAX > PERF_SAMPLE_TRANSACTION << 1) {
279 pr_debug("sample format has changed - test needs updating\n"); 284 pr_debug("sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating\n");
280 return -1; 285 return -1;
281 } 286 }
282 287