Skip to content

Commit

Permalink
From patchwork series 435626
Browse files Browse the repository at this point in the history
  • Loading branch information
Fox Snowpatch committed Dec 6, 2024
1 parent 1ecdccb commit 5322d8c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tools/perf/tests/shell/base_probe/test_invalid_options.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ if ! check_kprobes_available; then
exit 0
fi

# Check for presence of dwarf
$CMD_PERF check feature -q dwarf
[ $? -ne 0 ] && HINT_FAIL="Some of the tests need DWARF to run"

### missing argument

Expand Down Expand Up @@ -75,5 +78,5 @@ done


# print overall results
print_overall_results "$TEST_RESULT"
print_overall_results "$TEST_RESULT" $HINT_FAIL
exit $?
5 changes: 4 additions & 1 deletion tools/perf/tests/shell/base_probe/test_line_semantics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ if ! check_kprobes_available; then
exit 0
fi

# Check for presence of dwarf
$CMD_PERF check feature -q dwarf
[ $? -ne 0 ] && HINT_FAIL="Some of the tests need DWARF to run"

### acceptable --line descriptions

Expand Down Expand Up @@ -51,5 +54,5 @@ done


# print overall results
print_overall_results "$TEST_RESULT"
print_overall_results "$TEST_RESULT" $HINT_FAIL
exit $?
5 changes: 4 additions & 1 deletion tools/perf/tests/shell/common/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ print_results()
print_overall_results()
{
RETVAL="$1"; shift
TASK_COMMENT="$*"
test -n "$TASK_COMMENT" && TASK_COMMENT=":: $TASK_COMMENT"

if [ $RETVAL -eq 0 ]; then
_echo "$MALLPASS## [ PASS ] ##$MEND $TEST_NAME :: $THIS_TEST_NAME SUMMARY"
else
_echo "$MALLFAIL## [ FAIL ] ##$MEND $TEST_NAME :: $THIS_TEST_NAME SUMMARY :: $RETVAL failures found"
_echo "$MALLFAIL## [ FAIL ] ##$MEND $TEST_NAME :: $THIS_TEST_NAME SUMMARY :: $RETVAL failures found $TASK_COMMENT"
fi
return $RETVAL
}
Expand Down

0 comments on commit 5322d8c

Please sign in to comment.