From: Veronika Molnarova Date: Mon, 13 Jan 2025 18:25:57 +0000 (+0100) Subject: perf test perftool_testsuite: Return correct value for skipping X-Git-Tag: v6.14-rc1~29^2~22 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1ab138febca6510881a0114fcfb329044fb4ed22;p=linux-block.git perf test perftool_testsuite: Return correct value for skipping In 'perf test', a return value 2 represents that the test case was skipped. Fix this value for perftool_testsuite test cases to differentiate between skip and pass values. Signed-off-by: Veronika Molnarova Cc: Ian Rogers Cc: Namhyung Kim Link: https://lore.kernel.org/r/20250113182605.130719-3-vmolnaro@redhat.com Signed-off-by: Michael Petlan Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh b/tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh index 7a1059d1cd07..8226449ac5c3 100755 --- a/tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh +++ b/tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh @@ -22,7 +22,7 @@ TEST_RESULT=0 BLACKFUNC_LIST=`head -n 5 /sys/kernel/debug/kprobes/blacklist 2> /dev/null | cut -f2` if [ -z "$BLACKFUNC_LIST" ]; then print_overall_skipped - exit 0 + exit 2 fi # try to find vmlinux with DWARF debug info diff --git a/tools/perf/tests/shell/base_probe/test_adding_kernel.sh b/tools/perf/tests/shell/base_probe/test_adding_kernel.sh index 60b31a9ff236..df288cf90cd6 100755 --- a/tools/perf/tests/shell/base_probe/test_adding_kernel.sh +++ b/tools/perf/tests/shell/base_probe/test_adding_kernel.sh @@ -33,7 +33,7 @@ fi check_kprobes_available if [ $? -ne 0 ]; then print_overall_skipped - exit 0 + exit 2 fi diff --git a/tools/perf/tests/shell/base_probe/test_basic.sh b/tools/perf/tests/shell/base_probe/test_basic.sh index a69dc1c9f92c..9d8b5afbeddd 100755 --- a/tools/perf/tests/shell/base_probe/test_basic.sh +++ b/tools/perf/tests/shell/base_probe/test_basic.sh @@ -19,7 +19,7 @@ TEST_RESULT=0 if ! check_kprobes_available; then print_overall_skipped - exit 0 + exit 2 fi diff --git a/tools/perf/tests/shell/base_probe/test_invalid_options.sh b/tools/perf/tests/shell/base_probe/test_invalid_options.sh index 8d1570c44a54..92f7254eb32a 100755 --- a/tools/perf/tests/shell/base_probe/test_invalid_options.sh +++ b/tools/perf/tests/shell/base_probe/test_invalid_options.sh @@ -19,7 +19,7 @@ TEST_RESULT=0 if ! check_kprobes_available; then print_overall_skipped - exit 0 + exit 2 fi # Check for presence of DWARF diff --git a/tools/perf/tests/shell/base_probe/test_line_semantics.sh b/tools/perf/tests/shell/base_probe/test_line_semantics.sh index 2ab70a543087..20435b6bf6bc 100755 --- a/tools/perf/tests/shell/base_probe/test_line_semantics.sh +++ b/tools/perf/tests/shell/base_probe/test_line_semantics.sh @@ -20,7 +20,7 @@ TEST_RESULT=0 if ! check_kprobes_available; then print_overall_skipped - exit 0 + exit 2 fi # Check for presence of DWARF diff --git a/tools/perf/tests/shell/common/init.sh b/tools/perf/tests/shell/common/init.sh index 259706ef5899..26c7525651e0 100644 --- a/tools/perf/tests/shell/common/init.sh +++ b/tools/perf/tests/shell/common/init.sh @@ -88,7 +88,7 @@ consider_skipping() # the runmode of a testcase needs to be at least the current suite's runmode if [ $PERFTOOL_TESTSUITE_RUNMODE -lt $TESTCASE_RUNMODE ]; then print_overall_skipped - exit 0 + exit 2 fi }