perf evlist: Rename for_each() macros to for_each_entry()
[deliverable/linux.git] / tools / perf / tests / parse-events.c
index 7865f68dc0d82bea12c960c61792e9fd28857305..20c2e641c42265b1606d751c64ffec6bdf2e5d3c 100644 (file)
@@ -32,7 +32,7 @@ static int test__checkevent_tracepoint_multi(struct perf_evlist *evlist)
        TEST_ASSERT_VAL("wrong number of entries", evlist->nr_entries > 1);
        TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->nr_groups);
 
-       evlist__for_each(evlist, evsel) {
+       evlist__for_each_entry(evlist, evsel) {
                TEST_ASSERT_VAL("wrong type",
                        PERF_TYPE_TRACEPOINT == evsel->attr.type);
                TEST_ASSERT_VAL("wrong sample_type",
@@ -207,7 +207,7 @@ test__checkevent_tracepoint_multi_modifier(struct perf_evlist *evlist)
 
        TEST_ASSERT_VAL("wrong number of entries", evlist->nr_entries > 1);
 
-       evlist__for_each(evlist, evsel) {
+       evlist__for_each_entry(evlist, evsel) {
                TEST_ASSERT_VAL("wrong exclude_user",
                                !evsel->attr.exclude_user);
                TEST_ASSERT_VAL("wrong exclude_kernel",
@@ -1783,8 +1783,8 @@ static int test_pmu_events(void)
                struct evlist_test e;
                char name[MAX_NAME];
 
-               if (!strcmp(ent->d_name, ".") ||
-                   !strcmp(ent->d_name, ".."))
+               /* Names containing . are special and cannot be used directly */
+               if (strchr(ent->d_name, '.'))
                        continue;
 
                snprintf(name, MAX_NAME, "cpu/event=%s/u", ent->d_name);
This page took 0.034067 seconds and 5 git commands to generate.