]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
selftests: forwarding: Allow creation of interfaces without a config file
authorIdo Schimmel <idosch@mellanox.com>
Sun, 11 Mar 2018 07:57:25 +0000 (09:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Mar 2018 02:44:24 +0000 (22:44 -0400)
Some users want to be able to run the tests without a configuration file
which is useful when one needs to test both virtual and physical
interfaces on the same machine.

Move the defines that set the type of interface to create and whether to
create it away from the optional configuration file to the library like
the rest of the defines.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/forwarding.config.sample
tools/testing/selftests/net/forwarding/lib.sh

index df54c9eb51000416017f023671bf54ea486af015..e819d049d9ce15a8776071785a7a7424c8e8c558 100644 (file)
@@ -14,11 +14,6 @@ NETIFS[p6]=veth5
 NETIFS[p7]=veth6
 NETIFS[p8]=veth7
 
-NETIF_TYPE=veth
-
-# only virtual interfaces (veth) can be created by test infra
-#NETIF_CREATE=yes
-
 ##############################################################################
 # Defines
 
@@ -34,3 +29,7 @@ WAIT_TIME=5
 PAUSE_ON_FAIL=no
 # Whether to pause on cleanup or not.
 PAUSE_ON_CLEANUP=no
+# Type of network interface to create
+NETIF_TYPE=veth
+# Whether to create virtual interfaces (veth) or not
+NETIF_CREATE=yes
index e989d8a1d4fb5a4950bf5a2e0b2e352d33f5423a..1ac6c62271f352329dbc45407df11b6f238cb07c 100644 (file)
@@ -11,6 +11,8 @@ MZ=${MZ:=mausezahn}
 WAIT_TIME=${WAIT_TIME:=5}
 PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no}
 PAUSE_ON_CLEANUP=${PAUSE_ON_CLEANUP:=no}
+NETIF_TYPE=${NETIF_TYPE:=veth}
+NETIF_CREATE=${NETIF_CREATE:=yes}
 
 if [[ -f forwarding.config ]]; then
        source forwarding.config