Skip to content

Commit 1ab138f

Browse files
notValordacmel
authored andcommitted
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 <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>
1 parent 5afd6d3 commit 1ab138f

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

tools/perf/tests/shell/base_probe/test_adding_blacklisted.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ TEST_RESULT=0
2222
BLACKFUNC_LIST=`head -n 5 /sys/kernel/debug/kprobes/blacklist 2> /dev/null | cut -f2`
2323
if [ -z "$BLACKFUNC_LIST" ]; then
2424
print_overall_skipped
25-
exit 0
25+
exit 2
2626
fi
2727

2828
# try to find vmlinux with DWARF debug info

tools/perf/tests/shell/base_probe/test_adding_kernel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fi
3333
check_kprobes_available
3434
if [ $? -ne 0 ]; then
3535
print_overall_skipped
36-
exit 0
36+
exit 2
3737
fi
3838

3939

tools/perf/tests/shell/base_probe/test_basic.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ TEST_RESULT=0
1919

2020
if ! check_kprobes_available; then
2121
print_overall_skipped
22-
exit 0
22+
exit 2
2323
fi
2424

2525

tools/perf/tests/shell/base_probe/test_invalid_options.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ TEST_RESULT=0
1919

2020
if ! check_kprobes_available; then
2121
print_overall_skipped
22-
exit 0
22+
exit 2
2323
fi
2424

2525
# Check for presence of DWARF

tools/perf/tests/shell/base_probe/test_line_semantics.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TEST_RESULT=0
2020

2121
if ! check_kprobes_available; then
2222
print_overall_skipped
23-
exit 0
23+
exit 2
2424
fi
2525

2626
# Check for presence of DWARF

tools/perf/tests/shell/common/init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ consider_skipping()
8888
# the runmode of a testcase needs to be at least the current suite's runmode
8989
if [ $PERFTOOL_TESTSUITE_RUNMODE -lt $TESTCASE_RUNMODE ]; then
9090
print_overall_skipped
91-
exit 0
91+
exit 2
9292
fi
9393
}
9494

0 commit comments

Comments
 (0)