Commit 17a2634b authored by Andi Kleen's avatar Andi Kleen Committed by Arnaldo Carvalho de Melo

perf test: Ignore .scale and other special files

'perf test' tries to parse all entries in /sys/devices/cpu/events/.
Ignore the special entries like '.scale', which cannot be directly
parsed as an event. This patch assumes all files containing a '.' are
special and can be ignored.
Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1465223766-29902-1-git-send-email-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 40f20e50
...@@ -1783,8 +1783,8 @@ static int test_pmu_events(void) ...@@ -1783,8 +1783,8 @@ static int test_pmu_events(void)
struct evlist_test e; struct evlist_test e;
char name[MAX_NAME]; char name[MAX_NAME];
if (!strcmp(ent->d_name, ".") || /* Names containing . are special and cannot be used directly */
!strcmp(ent->d_name, "..")) if (strchr(ent->d_name, '.'))
continue; continue;
snprintf(name, MAX_NAME, "cpu/event=%s/u", ent->d_name); snprintf(name, MAX_NAME, "cpu/event=%s/u", ent->d_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment