From: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
To: linux-kernel@vger•kernel.org
Cc: Sasha Levin <sashal@kernel•org>, Ian Rogers <irogers@google•com>,
Athira Jajeev <atrajeev@linux•vnet.ibm.com>,
Nageswara R Sastry <rnsastry@linux•ibm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
Thomas Richter <tmricht@linux•ibm.com>,
stable@vger•kernel.org,
Arnaldo Carvalho de Melo <acme@redhat•com>,
Madhavan Srinivasan <maddy@linux•ibm.com>,
Jiri Olsa <jolsa@kernel•org>, Kajol Jain <kjain@linux•ibm.com>,
Disha Goel <disgoel@linux•vnet.ibm.com>,
linuxppc-dev@lists•ozlabs.org
Subject: [PATCH 5.18 071/181] perf test topology: Use !strncmp(right platform) to fix guest PPC comparision check
Date: Mon, 27 Jun 2022 13:20:44 +0200 [thread overview]
Message-ID: <20220627111946.622947848@linuxfoundation.org> (raw)
In-Reply-To: <20220627111944.553492442@linuxfoundation.org>
From: Athira Rajeev <atrajeev@linux•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@linux•ibm.com>
Signed-off-by: Athira Jajeev <atrajeev@linux•vnet.ibm.com>
Acked-by: Ian Rogers <irogers@google•com>
Cc: Athira Rajeev <atrajeev@linux•vnet.ibm.com>
Cc: Disha Goel <disgoel@linux•vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel•org>
Cc: Kajol Jain <kjain@linux•ibm.com>
Cc: linuxppc-dev@lists•ozlabs.org
Cc: Madhavan Srinivasan <maddy@linux•ibm.com>
Cc: Michael Ellerman <mpe@ellerman•id.au>
Cc: Nageswara R Sastry <rnsastry@linux•ibm.com>
Link: https://lore.kernel.org/r/20220610135939.63361-1-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat•com>
Signed-off-by: Sasha Levin <sashal@kernel•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
parent reply other threads:[~2022-06-27 11:41 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20220627111944.553492442@linuxfoundation.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220627111946.622947848@linuxfoundation.org \
--to=gregkh@linuxfoundation$(echo .)org \
--cc=acme@redhat$(echo .)com \
--cc=atrajeev@linux$(echo .)vnet.ibm.com \
--cc=disgoel@linux$(echo .)vnet.ibm.com \
--cc=irogers@google$(echo .)com \
--cc=jolsa@kernel$(echo .)org \
--cc=kjain@linux$(echo .)ibm.com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=maddy@linux$(echo .)ibm.com \
--cc=rnsastry@linux$(echo .)ibm.com \
--cc=sashal@kernel$(echo .)org \
--cc=stable@vger$(echo .)kernel.org \
--cc=tmricht@linux$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox