Commit 9c154ab4 authored by Alaa Mohamed's avatar Alaa Mohamed Committed by David S. Miller

selftests: net: fib_rule_tests: fix support for running individual tests

parsing and usage of -t got missed in the previous patch.
this patch fixes it

Fixes: 816cda9a ("selftests: net: fib_rule_tests: add support to select a test to run")
Signed-off-by: default avatarAlaa Mohamed <eng.alaamohamedsoliman.am@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 13463f73
...@@ -303,6 +303,29 @@ run_fibrule_tests() ...@@ -303,6 +303,29 @@ run_fibrule_tests()
log_section "IPv6 fib rule" log_section "IPv6 fib rule"
fib_rule6_test 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 if [ "$(id -u)" -ne 0 ];then
echo "SKIP: Need root privileges" echo "SKIP: Need root privileges"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment