Skip to content

Commit

Permalink
selftests: net: fib_rule_tests: fix support for running individual tests
Browse files Browse the repository at this point in the history
parsing and usage of -t got missed in the previous patch.
this patch fixes it

Fixes: 816cda9 ("selftests: net: fib_rule_tests: add support to select a test to run")
Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alaa Mohamed authored and David S. Miller committed Jul 1, 2022
1 parent 13463f7 commit 9c154ab
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tools/testing/selftests/net/fib_rule_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,29 @@ run_fibrule_tests()
log_section "IPv6 fib rule"
fib_rule6_test
}
################################################################################
# usage

usage()
{
cat <<EOF
usage: ${0##*/} OPTS
-t <test> Test(s) to run (default: all)
(options: $TESTS)
EOF
}

################################################################################
# main

while getopts ":t:h" opt; do
case $opt in
t) TESTS=$OPTARG;;
h) usage; exit 0;;
*) usage; exit 1;;
esac
done

if [ "$(id -u)" -ne 0 ];then
echo "SKIP: Need root privileges"
Expand Down

0 comments on commit 9c154ab

Please sign in to comment.