perf test: Do not fail Intel-PT misc test w/o libpython
Namhyung Kim
maintainerPATCH v2 1/1 perf test: Do not fail Intel-PT misc test w/o libpython
The virtuall 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.
--- tools/perf/tests/shell/test_intel_pt.sh | 6 ++++++ 1 file changed, 6 insertions(+)
tools/perf/tests/shell/test_intel_pt.sh +6 -0
@@ -526,6 +526,12 @@ test_kernel_trace() test_virtual_lbr() { echo "--- Test virtual LBR ---" + # Check if python script is supported + libpython=$(perf version --build-options | grep python | grep -cv OFF) + if [ "${libpython}" != "1" ] ; then + echo "SKIP: python scripting is not supported" + return 2 + fi # Python script to determine the maximum size of branch stacks cat << "_end_of_file_" > "${maxbrstack}"
Signature · 1 line
2.38.0.135.g90850a2211-goog
Quoted 2 lines · Namhyung Kim
The virtuall LBR test uses a python script to check the max size of
nit: virtual
Quoted 8 lines
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 f77811a0f625 ("perf test: test_intel_pt.sh: Add 9 tests")Cc Ammy Yi <[email protected]>Signed-off-by Namhyung Kim <[email protected]>
Thanks,
Ian
Quoted 24 lines
--- tools/perf/tests/shell/test_intel_pt.sh | 6 ++++++ 1 file changed, 6 insertions(+)tools/perf/tests/shell/test_intel_pt.sh +6
-1@@ -526,6 +526,12 @@ test_kernel_trace() test_virtual_lbr() { echo "--- Test virtual LBR ---" + # Check if python script is supported + libpython=$(perf version --build-options | grep python | grep -cv OFF) + if [ "${libpython}" != "1" ] ; then + echo "SKIP: python scripting is not supported" + return 2 + fi # Python script to determine the maximum size of branch stacks cat << "_end_of_file_" > "${maxbrstack}" --2.38.0.135.g90850a2211-goog
Arnaldo Carvalho de Melo
maintainerEm Fri, Oct 21, 2022 at 03:00:04PM -0700, Ian Rogers escreveu:
Quoted 5 lines · Namhyung Kim
Quoted 2 lines
The virtuall LBR test uses a python script to check the max size of
nit: virtual
Thanks, fixed and applied.
- Arnaldo
Quoted 38 lines
Quoted 8 lines
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 f77811a0f625 ("perf test: test_intel_pt.sh: Add 9 tests")Cc Ammy Yi <[email protected]>Signed-off-by Namhyung Kim <[email protected]>Acked-by Ian Rogers <[email protected]>Thanks,
IanQuoted 24 lines
--- tools/perf/tests/shell/test_intel_pt.sh | 6 ++++++ 1 file changed, 6 insertions(+)tools/perf/tests/shell/test_intel_pt.sh +6
-1@@ -526,6 +526,12 @@ test_kernel_trace() test_virtual_lbr() { echo "--- Test virtual LBR ---" + # Check if python script is supported + libpython=$(perf version --build-options | grep python | grep -cv OFF) + if [ "${libpython}" != "1" ] ; then + echo "SKIP: python scripting is not supported" + return 2 + fi # Python script to determine the maximum size of branch stacks cat << "_end_of_file_" > "${maxbrstack}" --2.38.0.135.g90850a2211-goog
Signature · 1 line
- Arnaldo
Quoted 9 lines · Namhyung Kim
The virtuall 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 f77811a0f625 ("perf test: test_intel_pt.sh: Add 9 tests")Cc Ammy Yi <[email protected]>Signed-off-by Namhyung Kim <[email protected]>
Quoted 21 lines
--- tools/perf/tests/shell/test_intel_pt.sh | 6 ++++++ 1 file changed, 6 insertions(+)tools/perf/tests/shell/test_intel_pt.sh +6
-0@@ -526,6 +526,12 @@ test_kernel_trace() test_virtual_lbr() { echo "--- Test virtual LBR ---" + # Check if python script is supported + libpython=$(perf version --build-options | grep python | grep -cv OFF) + if [ "${libpython}" != "1" ] ; then + echo "SKIP: python scripting is not supported" + return 2 + fi # Python script to determine the maximum size of branch stacks cat << "_end_of_file_" > "${maxbrstack}"