Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 40f20e50
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);