selftests: fib_tests: Allow user to run a specific test
authorDavid Ahern <dsahern@gmail.com>
Tue, 13 Mar 2018 15:29:40 +0000 (08:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Mar 2018 15:28:39 +0000 (11:28 -0400)
Allow a user to run just a specific fib test by setting the TEST
environment variable.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/fib_tests.sh

index 953254439e39b3b2a8f9be1636ed7ab8df73fe92..cfdeb35bfed5cda7e2b89d49e7f8b56eee49a830 100755 (executable)
@@ -392,9 +392,13 @@ fib_carrier_test()
 
 fib_test()
 {
-       fib_unreg_test
-       fib_down_test
-       fib_carrier_test
+       if [ -n "$TEST" ]; then
+               eval $TEST
+       else
+               fib_unreg_test
+               fib_down_test
+               fib_carrier_test
+       fi
 }
 
 if [ "$(id -u)" -ne 0 ];then