perf test session topology: Fix test to skip the test in guest environment

The session topology test fails in powerpc pSeries platform.

Test logs:

  Session topology : FAILED!

This testcases tests cpu topology by checking the core_id and socket_id
stored in perf_env from perf session. The data from perf session is
compared with the cpu topology information from
"/sys/devices/system/cpu/cpuX/topology" like core_id,

In case of virtual environment, detail like physical_package_id is
restricted to be exposed. Hence physical_package_id is set to -1. The
testcase fails on such platforms since socket_id can't be fetched from
topology info.

Skip the testcase in powerpc if physical_package_id returns -1.

Reviewed-by: Kajol Jain <>
Signed-off-by: Athira Rajeev <>---
Tested-by: Disha Goel <>
Acked-by: Ian Rogers <>
Cc: Jiri Olsa <>
Cc: Madhavan Srinivasan <>
Cc: Michael Ellerman <>
Cc: Nageswara R Sastry <>
Signed-off-by: Arnaldo Carvalho de Melo <>
1 file changed