aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2024-01-23 20:30:14 -0800
committerArnaldo Carvalho de Melo <[email protected]>2024-01-26 10:51:49 -0300
commit1c2124ec8431f88f5c122be73cb4b784b558d600 (patch)
tree6cc584c7398a2dfe77552d53cd95664a926b61f0
parenta734c7f969750302b1150ef20468704498f74e64 (diff)
perf test shell script: Fix test for python being disabled
"grep -cv" can exit with an error code that causes the "set -e" to abort the script. Switch to using the grep exit code in the if condition to avoid this. Signed-off-by: Ian Rogers <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ravi Bangoria <[email protected]> Cc: Ross Zwisler <[email protected]> Cc: Shirisha G <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rwxr-xr-xtools/perf/tests/shell/script.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/tests/shell/script.sh b/tools/perf/tests/shell/script.sh
index 2973adab445d..fa4d71e2e72a 100755
--- a/tools/perf/tests/shell/script.sh
+++ b/tools/perf/tests/shell/script.sh
@@ -36,8 +36,7 @@ test_db()
echo "DB test"
# Check if python script is supported
- libpython=$(perf version --build-options | grep python | grep -cv OFF)
- if [ "${libpython}" != "1" ] ; then
+ if perf version --build-options | grep python | grep -q OFF ; then
echo "SKIP: python scripting is not supported"
err=2
return