Skip to content

Fix session topology test for powerpc and add utility function to get cpuinfo entries

Athira Rajeev linux-perf-users linuxppc-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 7 repliesIn review
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

Addressed review comments from Kajol.
Use "strim" to remove space from string. Also use "feof" to check for EOF instead of using new variable "ret".

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tools/perf: Add utility function to read /proc/cpuinfo for any fieldtools/perf/util/header.c tools/perf/util/header.h+54 -04 replies
2/2tools/perf/tests: Fix session topology test to skip the test in guest environmenttools/perf/tests/topology.c+17 -01 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKajol Jain
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH V2 0/2] Fix session topology test for powerpc and add utility function to get cpuinfo entries

The session topology test fails in powerpc pSeries platform. Test logs:
<<>>
Session topology : FAILED!
<<>>

This test uses cpu topology information and in powerpc, some of the topology info is restricted in environment like virtualized platform. Hence this test needs to be skipped in pSeries platform for powerpc. The information about platform is available in /proc/cpuinfo.

Patch 1 adds generic utility function in "util/header.c" to read /proc/cpuinfo for any entry. Though the testcase fix needs value from "platform" entry, making this as a generic function to return value for any entry from the /proc/cpuinfo file which can be used commonly in future usecases.

Patch 2 uses the newly added utility function to look for platform and skip the test in pSeries platform for powerpc.

Athira Rajeev (2):
tools/perf: Add utility function to read /proc/cpuinfo for any field tools/perf/tests: Fix session topology test to skip the test in guest
environment

Changelog:
V1 -> v2:
Addressed review comments from Kajol.
Use "strim" to remove space from string. Also use "feof" to check for EOF instead of using new variable "ret".

 tools/perf/tests/topology.c | 17 ++++++++++++
 tools/perf/util/header.c    | 53 +++++++++++++++++++++++++++++++++++++
 tools/perf/util/header.h    |  1 +
 3 files changed, 71 insertions(+)
Signature · 1 line
2.35.1