@@ -163,6 +163,24 @@ static int test__checkevent_pmu(struct evlist *evlist)
163
163
return TEST_OK ;
164
164
}
165
165
166
+ static int test__hybrid_hw_group_event_2 (struct evlist * evlist )
167
+ {
168
+ struct evsel * evsel , * leader ;
169
+
170
+ evsel = leader = evlist__first (evlist );
171
+ TEST_ASSERT_VAL ("wrong number of entries" , 2 == evlist -> core .nr_entries );
172
+ TEST_ASSERT_VAL ("wrong type" , PERF_TYPE_HARDWARE == evsel -> core .attr .type );
173
+ TEST_ASSERT_VAL ("wrong hybrid type" , test_hybrid_type (evsel , PERF_TYPE_RAW ));
174
+ TEST_ASSERT_VAL ("wrong config" , test_config (evsel , PERF_COUNT_HW_CPU_CYCLES ));
175
+ TEST_ASSERT_VAL ("wrong leader" , evsel__has_leader (evsel , leader ));
176
+
177
+ evsel = evsel__next (evsel );
178
+ TEST_ASSERT_VAL ("wrong type" , PERF_TYPE_RAW == evsel -> core .attr .type );
179
+ TEST_ASSERT_VAL ("wrong config" , evsel -> core .attr .config == 0x3c );
180
+ TEST_ASSERT_VAL ("wrong leader" , evsel__has_leader (evsel , leader ));
181
+ return TEST_OK ;
182
+ }
183
+
166
184
struct evlist_test {
167
185
const char * name ;
168
186
bool (* valid )(void );
@@ -215,6 +233,11 @@ static const struct evlist_test test__hybrid_events[] = {
215
233
.check = test__hybrid_cache_event ,
216
234
/* 8 */
217
235
},
236
+ {
237
+ .name = "{cpu_core/cycles/,cpu_core/cpu-cycles/}" ,
238
+ .check = test__hybrid_hw_group_event_2 ,
239
+ /* 9 */
240
+ },
218
241
};
219
242
220
243
static int test_event (const struct evlist_test * e )
0 commit comments