Skip to content

Commit b236371

Browse files
athira-rajeevacmel
authored andcommitted
perf test topology: Use !strncmp(right platform) to fix guest PPC comparision check
commit cfd7092 ("perf test session topology: Fix test to skip the test in guest environment") added check to skip the testcase if the socket_id can't be fetched from topology info. But the condition check uses strncmp which should be changed to !strncmp and to correctly match platform. Fix this condition check. Fixes: cfd7092 ("perf test session topology: Fix test to skip the test in guest environment") Reported-by: Thomas Richter <[email protected]> Signed-off-by: Athira Jajeev <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Disha Goel <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kajol Jain <[email protected]> Cc: [email protected] Cc: Madhavan Srinivasan <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Nageswara R Sastry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 72dcae8 commit b236371

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/tests/topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
115115
* physical_package_id will be set to -1. Hence skip this
116116
* test if physical_package_id returns -1 for cpu from perf_cpu_map.
117117
*/
118-
if (strncmp(session->header.env.arch, "powerpc", 7)) {
118+
if (!strncmp(session->header.env.arch, "ppc64le", 7)) {
119119
if (cpu__get_socket_id(perf_cpu_map__cpu(map, 0)) == -1)
120120
return TEST_SKIP;
121121
}

0 commit comments

Comments
 (0)