Skip to content

Commit 5322d8c

Browse files
author
Fox Snowpatch
committed
1 parent 1ecdccb commit 5322d8c

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ if ! check_kprobes_available; then
2222
exit 0
2323
fi
2424

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

2629
### missing argument
2730

@@ -75,5 +78,5 @@ done
7578

7679

7780
# print overall results
78-
print_overall_results "$TEST_RESULT"
81+
print_overall_results "$TEST_RESULT" $HINT_FAIL
7982
exit $?

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ if ! check_kprobes_available; then
2323
exit 0
2424
fi
2525

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

2730
### acceptable --line descriptions
2831

@@ -51,5 +54,5 @@ done
5154

5255

5356
# print overall results
54-
print_overall_results "$TEST_RESULT"
57+
print_overall_results "$TEST_RESULT" $HINT_FAIL
5558
exit $?

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ print_results()
4646
print_overall_results()
4747
{
4848
RETVAL="$1"; shift
49+
TASK_COMMENT="$*"
50+
test -n "$TASK_COMMENT" && TASK_COMMENT=":: $TASK_COMMENT"
51+
4952
if [ $RETVAL -eq 0 ]; then
5053
_echo "$MALLPASS## [ PASS ] ##$MEND $TEST_NAME :: $THIS_TEST_NAME SUMMARY"
5154
else
52-
_echo "$MALLFAIL## [ FAIL ] ##$MEND $TEST_NAME :: $THIS_TEST_NAME SUMMARY :: $RETVAL failures found"
55+
_echo "$MALLFAIL## [ FAIL ] ##$MEND $TEST_NAME :: $THIS_TEST_NAME SUMMARY :: $RETVAL failures found $TASK_COMMENT"
5356
fi
5457
return $RETVAL
5558
}

0 commit comments

Comments
 (0)