# # test_invalid_options of perf_probe test # Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> # Author: Michael Petlan <mpetlan@redhat.com> # # Description: # # This test checks whether the invalid and incompatible options are reported #
# include working environment
. ../common/init.sh
TEST_RESULT=0
if ! check_kprobes_available; then
print_overall_skipped
exit 2 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
# some options require an argument for opt in '-a''-d''-L''-V'; do
! $CMD_PERF probe $opt 2> $LOGS_DIR/invalid_options_missing_argument$opt.err
PERF_EXIT_CODE=$?
../common/check_all_patterns_found.pl "Error: switch .* requires a value" < $LOGS_DIR/invalid_options_missing_argument$opt.err
CHECK_EXIT_CODE=$?
# some options may omit the argument for opt in '-F''-l'; do
$CMD_PERF probe -F > /dev/null 2> $LOGS_DIR/invalid_options_unnecessary_argument$opt.err
PERF_EXIT_CODE=$?
test ! -s $LOGS_DIR/invalid_options_unnecessary_argument$opt.err
CHECK_EXIT_CODE=$?
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.