Skip to content

Commit

Permalink
selftests: net: fib_rule_tests: add support to select a test to run
Browse files Browse the repository at this point in the history
Add boilerplate test loop in test to run all tests
in fib_rule_tests.sh

Signed-off-by: Alaa Mohamed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
EngAlaaSoliman authored and davem330 committed Apr 13, 2022
1 parent 4263f77 commit 816cda9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/testing/selftests/net/fib_rule_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SRC_IP6=2001:db8:1::3
DEV_ADDR=192.51.100.1
DEV_ADDR6=2001:db8:1::1
DEV=dummy0
TESTS="fib_rule6 fib_rule4"

log_test()
{
Expand Down Expand Up @@ -316,7 +317,16 @@ fi
# start clean
cleanup &> /dev/null
setup
run_fibrule_tests
for t in $TESTS
do
case $t in
fib_rule6_test|fib_rule6) fib_rule6_test;;
fib_rule4_test|fib_rule4) fib_rule4_test;;

help) echo "Test names: $TESTS"; exit 0;;

esac
done
cleanup

if [ "$TESTS" != "none" ]; then
Expand Down

0 comments on commit 816cda9

Please sign in to comment.