[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220627111946.622947848@linuxfoundation.org>
Date: Mon, 27 Jun 2022 13:20:44 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Thomas Richter <tmricht@...ux.ibm.com>,
Athira Jajeev <atrajeev@...ux.vnet.ibm.com>,
Ian Rogers <irogers@...gle.com>,
Disha Goel <disgoel@...ux.vnet.ibm.com>,
Jiri Olsa <jolsa@...nel.org>, Kajol Jain <kjain@...ux.ibm.com>,
linuxppc-dev@...ts.ozlabs.org,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Nageswara R Sastry <rnsastry@...ux.ibm.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.18 071/181] perf test topology: Use !strncmp(right platform) to fix guest PPC comparision check
From: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
[ Upstream commit b236371421df57b93fc49c4b9d0e53bd1aab2b2e ]
commit cfd7092c31aed728 ("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: cfd7092c31aed728 ("perf test session topology: Fix test to skip the test in guest environment")
Reported-by: Thomas Richter <tmricht@...ux.ibm.com>
Signed-off-by: Athira Jajeev <atrajeev@...ux.vnet.ibm.com>
Acked-by: Ian Rogers <irogers@...gle.com>
Cc: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
Cc: Disha Goel <disgoel@...ux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Kajol Jain <kjain@...ux.ibm.com>
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: Madhavan Srinivasan <maddy@...ux.ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Nageswara R Sastry <rnsastry@...ux.ibm.com>
Link: https://lore.kernel.org/r/20220610135939.63361-1-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
tools/perf/tests/topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
index d23a9e322ff5..0b4f61b6cc6b 100644
--- a/tools/perf/tests/topology.c
+++ b/tools/perf/tests/topology.c
@@ -115,7 +115,7 @@ static int check_cpu_topology(char *path, struct perf_cpu_map *map)
* physical_package_id will be set to -1. Hence skip this
* test if physical_package_id returns -1 for cpu from perf_cpu_map.
*/
- if (strncmp(session->header.env.arch, "powerpc", 7)) {
+ if (!strncmp(session->header.env.arch, "ppc64le", 7)) {
if (cpu__get_socket_id(perf_cpu_map__cpu(map, 0)) == -1)
return TEST_SKIP;
}
--
2.35.1
Powered by blists - more mailing lists