Skip to content

Commit

Permalink
selftests: forwarding: Allow to get netdev interfaces names from comm…
Browse files Browse the repository at this point in the history
…andline

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Feb 28, 2018
1 parent 4e4272d commit 781fe63
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/testing/selftests/net/forwarding/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ if [[ ! -v NUM_NETIFS ]]; then
exit 0
fi

##############################################################################
# Command line options handling

count=0

while [[ $# -gt 0 ]]; do
if [[ "$count" -eq "0" ]]; then
unset NETIFS
declare -A NETIFS
fi
count=$((count + 1))
NETIFS[p$count]="$1"
shift
done

##############################################################################
# Network interfaces configuration

Expand Down

0 comments on commit 781fe63

Please sign in to comment.