Skip to content

Commit 246122a

Browse files
namhyungacmel
authored andcommitted
perf test: Do not fail Intel-PT misc test w/o libpython
The virtual LBR test uses a python script to check the max size of branch stack in the Intel-PT generated LBR. But it didn't check whether python scripting is available (as it's optional). Let's skip the test if the python support is not available. Fixes: f77811a ("perf test: test_intel_pt.sh: Add 9 tests") Reviewed-by: Adrian Hunter <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Ammy Yi <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 5a6c184 commit 246122a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/perf/tests/shell/test_intel_pt.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,12 @@ test_kernel_trace()
526526
test_virtual_lbr()
527527
{
528528
echo "--- Test virtual LBR ---"
529+
# Check if python script is supported
530+
libpython=$(perf version --build-options | grep python | grep -cv OFF)
531+
if [ "${libpython}" != "1" ] ; then
532+
echo "SKIP: python scripting is not supported"
533+
return 2
534+
fi
529535

530536
# Python script to determine the maximum size of branch stacks
531537
cat << "_end_of_file_" > "${maxbrstack}"

0 commit comments

Comments
 (0)