perf test perftool_testsuite: Return correct value for skipping
authorVeronika Molnarova <vmolnaro@redhat.com>
Mon, 13 Jan 2025 18:25:57 +0000 (19:25 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Jan 2025 17:57:20 +0000 (14:57 -0300)
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 <vmolnaro@redhat.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20250113182605.130719-3-vmolnaro@redhat.com
Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh
tools/perf/tests/shell/base_probe/test_adding_kernel.sh
tools/perf/tests/shell/base_probe/test_basic.sh
tools/perf/tests/shell/base_probe/test_invalid_options.sh
tools/perf/tests/shell/base_probe/test_line_semantics.sh
tools/perf/tests/shell/common/init.sh

index 7a1059d1cd07171a6c70dbc3d513e7ba1117111d..8226449ac5c3ddb05e1302a599269e8be3586a13 100755 (executable)
@@ -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
index 60b31a9ff2368f33f60ea2b905e83efd2f0f50a7..df288cf90cd6647b7b5702f5884f6ca039faa438 100755 (executable)
@@ -33,7 +33,7 @@ fi
 check_kprobes_available
 if [ $? -ne 0 ]; then
        print_overall_skipped
-       exit 0
+       exit 2
 fi
 
 
index a69dc1c9f92c1b9654a53a2bd08b8dde0bf83333..9d8b5afbeddda268901fe84295a36b3d63edcbe7 100755 (executable)
@@ -19,7 +19,7 @@ TEST_RESULT=0
 
 if ! check_kprobes_available; then
        print_overall_skipped
-       exit 0
+       exit 2
 fi
 
 
index 8d1570c44a54ac75a7208b96df334958f69d0825..92f7254eb32a31d077c32387ae08cc1cb1b59705 100755 (executable)
@@ -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
index 2ab70a543087c5437a79932f06c408582075b37f..20435b6bf6bc654d6670c45c8fdf96eab1278b21 100755 (executable)
@@ -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
index 259706ef58994bf9c6b8d18f04494288d83d3365..26c7525651e084fcdf4b55aba0635828b54c6c9b 100644 (file)
@@ -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
 }